not calling inherited use GDIPOB.pas's TGPGraphics class Procedure TBitmapForceHalftone.Draw(ACanvas: TCanvas const Rect: TRect) Procedure Draw(ACanvas: TCanvas const Rect: TRect) override So I 'fixed' it with assigning to one of these instead: TBitmapForceHalftone=class(TBitmap) As Rob points out, TBitmap.Draw uses HALFTONE only when the destination canvas is 8 bits-per-pixel or lower and the source canvas has more. Update (2014-09) Just now I was in a similar situation (again) and had a TImage in a TScrollBox with lots more going on on the form, and really wanted Image1.Stretch:=true to do halftone. I'm not sure if this is provided using default Delphi calls, but that's the way I generally solve this issue. If you revert to using Win32 API calls, you can use SetStretchBltMode to HALFTONE and use StretchBlt.
0 Comments
Leave a Reply. |