View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020195 | Lazarus | LCL | public | 2011-09-08 17:59 | 2011-12-24 11:54 |
Reporter | Zex Atilla | Assigned To | Felipe Monteiro de Carvalho | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 0.9.30 | ||||
Target Version | 1.0.0 | Fixed in Version | 0.9.31 (SVN) | ||
Summary | 0020195: Canvas.Frame does nothing | ||||
Description | Seems that Canvas.Frame function is missing an implementation. Canvas.FrameRect works, but Canvas.Frame doesn't. At least under Windows XP. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 34379 | ||||
LazTarget | 1.0 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
Please attach example. |
|
Create an empty form with a button and add this code: procedure TForm1.Button1Click(Sender: TObject); begin Canvas.Pen.Color := clBlue; // Canvas.Frame uses (or should use) Pen Canvas.Brush.Color := clGreen; // Canvas.FrameRect uses Brush Canvas.Frame(100, 100, 300, 200); // this doesn't work Canvas.FrameRect(105, 105, 305, 205); // this works end; |
|
hm...I don't see TCanvas.Frame at embarcadero site .. only FrameRect , I think it must be removed ... http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/!!MEMBERTYPE_Methods_Graphics_TCanvas.html |
|
They probably just kept the FrameRect (which uses Brush instead of Pen). |
|
Yes, Frame looks non-sensical. But maybe we should deprecate it before removing? |
|
+1 |
|
Mattias added it, so maybe we should wait for input from him: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=2701 |
|
Or another idea: Remove the LCLIntf implementation and add the trivial/cross-widgetset implementation for this routine: OldBrushStyle := Brush.Style; Brush.Style := bsClear; Rectangle(); Brush.Style := OldBrushStyle; |
|
I fixed like my last comment. Please test and close if ok. I see that LCL-Carbon had a wrong idea about this routine, thinking it is about a "native frame", but it is not. It is really only a rectangle border using the Pen and that's how it is defined in TCanvas and how it was started in gtk. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-09-08 17:59 | Zex Atilla | New Issue | |
2011-09-08 17:59 | Zex Atilla | Widgetset | => Win32/Win64 |
2011-10-07 14:44 | Vincent Snijders | LazTarget | => 1.0 |
2011-10-07 14:44 | Vincent Snijders | Status | new => acknowledged |
2011-10-07 14:44 | Vincent Snijders | Target Version | => 1.0.0 |
2011-10-30 14:04 | Zeljan Rikalo | Note Added: 0053639 | |
2011-10-30 14:04 | Zeljan Rikalo | Status | acknowledged => feedback |
2011-11-10 16:41 | Zex Atilla | Note Added: 0053979 | |
2011-11-11 08:01 | Zeljan Rikalo | Note Added: 0053995 | |
2011-12-22 19:12 | Zex Atilla | Note Added: 0055229 | |
2011-12-22 21:10 | Felipe Monteiro de Carvalho | Note Added: 0055233 | |
2011-12-22 21:51 | Zeljan Rikalo | Note Added: 0055234 | |
2011-12-22 22:23 | Felipe Monteiro de Carvalho | Note Added: 0055235 | |
2011-12-23 09:31 | Felipe Monteiro de Carvalho | Note Added: 0055238 | |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Fixed in Revision | => 34379 |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Status | feedback => resolved |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Fixed in Version | => 0.9.31 (SVN) |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Resolution | open => fixed |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Assigned To | => Felipe Monteiro de Carvalho |
2011-12-24 11:54 | Felipe Monteiro de Carvalho | Note Added: 0055254 |