View Issue Details

IDProjectCategoryView StatusLast Update
0014127PackagesLazReportpublic2013-10-18 04:26
ReporterBoguslaw Brandys Assigned ToJesus Reyes  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformwindowsOSwindows xp home 
Product Version0.9.27 (SVN) 
Target Version1.2.0Fixed in Version1.3 (SVN) 
Summary0014127: Report shape tool has black shadow
DescriptionLook at attached screenshot.It is just after re-run application and opening report in designer.
Tagslazreport
Fixed in Revision43271
LazTarget1.2
WidgetsetGTK 2, Win32/Win64, Carbon
Attached Files

Activities

2009-07-10 17:44

 

elipse.jpg (47,103 bytes)   
elipse.jpg (47,103 bytes)   

Boguslaw Brandys

2009-07-10 18:01

developer   ~0029022

It's general problem of background which is black. For example if I put line element and change it style to Dot it is properly shown on preview but on designer canvas between dots there is black colour not background

Boguslaw Brandys

2009-07-12 14:12

developer   ~0029061

I noted that every visible element of report is based on TfrView class which inherits from TPersistent. What would be the problem if we change it to be inherited from TGraphicControl ? I think that will resolve repainting background issues (like black shadows) , but I don't know how preview and printout are generated. Are they just draw on canvas or it is more complex ?

2009-08-02 13:39

 

temporary.patch (809 bytes)   
Index: components/lazreport/source/lr_shape.pas
===================================================================
--- components/lazreport/source/lr_shape.pas	(revision 21066)
+++ components/lazreport/source/lr_shape.pas	(working copy)
@@ -139,7 +139,17 @@
 procedure TfrShapeView.Draw(aCanvas: TCanvas);
 var
   FillC: Integer;
+
+procedure FillBackGround;
 begin
+ Canvas.Brush.Bitmap := nil;
+ Canvas.Brush.Style := bsSolid;
+ Canvas.Brush.Color := clNone;
+ Canvas.FillRect(DRect);
+end;
+
+
+begin
   BeginDraw(aCanvas);
   Memo1.Assign(Memo);
   BeginUpdate;
@@ -148,7 +158,9 @@
     FillC := FillColor;
     FillColor := clNone;
     Frames :=[];
-    //ShowBackground;
+
+    if DocMode = dmDesigning then FillBackground;
+
     FillColor := FillC;
     DrawShape(aCanvas);
     RestoreCoord;
temporary.patch (809 bytes)   

Boguslaw Brandys

2009-08-02 13:43

developer   ~0029459

Uploaded temporary fix.It fills background rectangle around shape with white colour before actually drawing shape, of course only at design time.At least now it's not looking so ugly at design time.
Please commit it.

I was wondering also about such a trick : create TBitmap snapshot of background rectangle before drawing shape and fill rectangle with that bitmap brush.
Would that work ?

Jesus Reyes

2013-10-18 04:26

developer   ~0070868

It's not still perfect due differences between shape region and shape drawing but I believe it has been improved.

Issue History

Date Modified Username Field Change
2009-07-10 17:42 Boguslaw Brandys New Issue
2009-07-10 17:42 Boguslaw Brandys Status new => assigned
2009-07-10 17:42 Boguslaw Brandys Assigned To => Jesus Reyes
2009-07-10 17:42 Boguslaw Brandys LazTarget => -
2009-07-10 17:42 Boguslaw Brandys Widgetset => Win32/Win64
2009-07-10 17:44 Boguslaw Brandys File Added: elipse.jpg
2009-07-10 18:01 Boguslaw Brandys Note Added: 0029022
2009-07-12 14:12 Boguslaw Brandys Note Added: 0029061
2009-08-02 13:39 Boguslaw Brandys File Added: temporary.patch
2009-08-02 13:43 Boguslaw Brandys Note Added: 0029459
2010-03-15 04:00 Jesus Reyes Tag Attached: lazreport
2013-09-14 00:41 Martin Friebe LazTarget - => 1.2
2013-09-14 00:42 Martin Friebe Target Version 0.9.27 (SVN) => 1.2.0
2013-10-18 04:26 Jesus Reyes Fixed in Revision => 43271
2013-10-18 04:26 Jesus Reyes Widgetset Win32/Win64 => GTK 2, Win32/Win64, Carbon
2013-10-18 04:26 Jesus Reyes Note Added: 0070868
2013-10-18 04:26 Jesus Reyes Status assigned => resolved
2013-10-18 04:26 Jesus Reyes Fixed in Version => 1.3 (SVN)
2013-10-18 04:26 Jesus Reyes Resolution open => fixed