Luiz Americo Pereira Camara пишет:
Paul Ishenin wrote:
Luiz Americo Pereira Camara wrote:
function CreatePatternBrush(hbmp:HBITMAP):HBRUSH;
var
Log: TLogBrush;
begin
with Log do
begin
lbColor := 0;
lbHatch := hbmp;
lbStyle := BS_PATTERN;
Result := CreateBrushIndirect(Log);
end;
end;
I warry in this case about DIBs, but for other widgetsets than windows
I can use indeed CreateBrushIndirect.
Yes. In windows case there's a native CreatePatternBrush that already
sets the lbHatch (BS_PATTERN/BS_DIBPATTERN) according to bitmap type. So
no need to use this simplified version.
This example, in fact, was to be used by other widgetsets (similar to
what i did in LCLExtensions package)
Thanks for pointing me to that and thanks for your patch. I've moved my
qt and gtk code to CreateBrushIndirect. I also reviewed your patch and
added missed things from it.
All changes are fixed in r12874. I hope you can close your bugtracker
items now.
Best regards,
Paul Ishenin.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives