View Issue Details

IDProjectCategoryView StatusLast Update
0035126FPCFCLpublic2019-11-15 18:09
ReporterOndrej PokornyAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version3.3.1 
Summary0035126: fpCanvas: make "other" public methods from TFPCustomCanvas virtual
Descriptionthe 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 InformationReason: 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.
TagsNo tags attached.
Fixed in Revision43480
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

Michael Van Canneyt

2019-11-15 16:22

administrator   ~0119322

I made the methods virtual.

Ondrej Pokorny

2019-11-15 18:09

developer   ~0119325

Thanks

Issue History

Date Modified Username Field Change
2019-02-21 09:57 Ondrej Pokorny New Issue
2019-02-21 15:01 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-02-21 15:01 Michael Van Canneyt Status new => assigned
2019-11-15 16:22 Michael Van Canneyt Status assigned => resolved
2019-11-15 16:22 Michael Van Canneyt Resolution open => fixed
2019-11-15 16:22 Michael Van Canneyt Fixed in Version => 3.3.1
2019-11-15 16:22 Michael Van Canneyt Fixed in Revision => 43480
2019-11-15 16:22 Michael Van Canneyt FPCTarget => 3.2.0
2019-11-15 16:22 Michael Van Canneyt Note Added: 0119322
2019-11-15 18:09 Ondrej Pokorny Status resolved => closed
2019-11-15 18:09 Ondrej Pokorny Note Added: 0119325