View Issue Details

IDProjectCategoryView StatusLast Update
0023751LazarusLCLpublic2013-04-01 20:59
ReporterPatrick ChevalleyAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.0.4Product Build 
Target Version1.2.0Fixed in Version1.1 (SVN) 
Summary0023751: PostscriptCanvas crash with Carbon when drawing to the canvas
DescriptionPostscriptCanvas crash when using a drawing function with the Carbon widgetset. I not remark this problem with Win32 and Gtk2.

The example program: examples/postscript/samplepostscriptcanvas.lpr crash on the first RoundRect when drawing the title.

I traced the problem to be in Canvas.RealizeAntialiasing because of the dummy handle used by PostscriptCanvas.

The attached patch fix the problem by adding a dummy override for TPostScriptPrinterCanvas.RealizeAntialiasing as this is already done for other Canvas method.

Can someone review and apply this patch?

TagsNo tags attached.
Fixed in Revision39975
LazTarget1.2
WidgetsetCarbon
Attached Files
  • postscriptcanvas_carbon.patch (824 bytes)
    Index: lcl/postscriptcanvas.pas
    ===================================================================
    --- lcl/postscriptcanvas.pas	(revision 39710)
    +++ lcl/postscriptcanvas.pas	(working copy)
    @@ -126,6 +126,7 @@
         procedure RegionChanging(APen: TObject); override;
         procedure RequiredState(ReqState: TCanvasState); override;
         procedure DoEllipseAndFill(const Bounds: TRect); override;
    +    procedure RealizeAntialiasing; override;
     
         function GetClipRect: TRect; override;
         procedure SetClipRect(const ARect: TRect); override;
    @@ -1157,6 +1158,11 @@
       SetHandle(1); // set dummy handle
     end;
     
    +procedure TPostScriptPrinterCanvas.RealizeAntialiasing;
    +begin
    +  // handle is dummy, so do nothing here
    +end;
    +
     procedure TPostScriptPrinterCanvas.CreateBrush;
     begin
       // handle is dummy, so do nothing here
    

Activities

2013-01-25 19:40

 

postscriptcanvas_carbon.patch (824 bytes)
Index: lcl/postscriptcanvas.pas
===================================================================
--- lcl/postscriptcanvas.pas	(revision 39710)
+++ lcl/postscriptcanvas.pas	(working copy)
@@ -126,6 +126,7 @@
     procedure RegionChanging(APen: TObject); override;
     procedure RequiredState(ReqState: TCanvasState); override;
     procedure DoEllipseAndFill(const Bounds: TRect); override;
+    procedure RealizeAntialiasing; override;
 
     function GetClipRect: TRect; override;
     procedure SetClipRect(const ARect: TRect); override;
@@ -1157,6 +1158,11 @@
   SetHandle(1); // set dummy handle
 end;
 
+procedure TPostScriptPrinterCanvas.RealizeAntialiasing;
+begin
+  // handle is dummy, so do nothing here
+end;
+
 procedure TPostScriptPrinterCanvas.CreateBrush;
 begin
   // handle is dummy, so do nothing here

Jesus Reyes

2013-01-27 10:16

developer   ~0065210

Applied, thanks.

Issue History

Date Modified Username Field Change
2013-01-25 19:40 Patrick Chevalley New Issue
2013-01-25 19:40 Patrick Chevalley File Added: postscriptcanvas_carbon.patch
2013-01-25 19:40 Patrick Chevalley Widgetset => Carbon
2013-01-27 10:08 Jesus Reyes Status new => assigned
2013-01-27 10:08 Jesus Reyes Assigned To => Jesus Reyes
2013-01-27 10:16 Jesus Reyes Fixed in Revision => 39975
2013-01-27 10:16 Jesus Reyes LazTarget => 1.2
2013-01-27 10:16 Jesus Reyes Status assigned => resolved
2013-01-27 10:16 Jesus Reyes Fixed in Version => 1.1 (SVN)
2013-01-27 10:16 Jesus Reyes Resolution open => fixed
2013-01-27 10:16 Jesus Reyes Note Added: 0065210
2013-01-27 10:16 Jesus Reyes Target Version => 1.2.0