fpCanvas: make "other" public methods from TFPCustomCanvas virtual
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
the methods in TFPCustomCanvas
- CopyRect
- Draw
- StretchDraw
should be made virtual (abstract) and their implementation should be moved to descendant classes like it is with other drawing routines.
1.) CopyRect uses hard-coded "matrix coodinates" (in LCL's TCanvas it should copy 1px less).
2.) LCL's TCanvas (and other custom-made TFPCustomCanvas descendants) should be able to override the Draw and StretchDraw methods.
Additional information:
Reason: imagine a vector-based TFPCustomCanvas-descendant that does not support pixel drawing (property Colors raises an exception when used). E.g. TPDFCanvas or TPostScriptCanvas. It must override Draw/StretchDraw and feed the bitmap data directly to PostScript or PDF.
I will try to come up with a patch.
Mantis conversion info:
- Mantis ID: 35126
- Fixed in version: 3.3.1
- Fixed in revision: 43480 (#de07c3b5)
- Target version: 3.2.0