View Issue Details

IDProjectCategoryView StatusLast Update
0024657LazarusPrinterpublic2014-01-02 11:26
ReporterPetr-KAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.1 (SVN)Product Build#41768 
Target Version1.3 (SVN)Fixed in Version1.2.0 
Summary0024657: Merge my chages to CairoCanvas
DescriptionI'am author of cairocanvas package.
And this is merge my newest changes between I send package to Jesus Reyes (2010) and he includes it to lazarus/components (2013).

Due to changing CreateCairoHandle procedure I rewrite
cairographics.pas, unix/gdkcairocanvas.pas, win/win32cairocanvas.pas
that where not compilable.

Remains to resolve how to compile cairographics, gdkcairocanvas and win32cairocanvas units. Now they are not compiled by make process. I do not know build process in detail, then I do not propose how to do that in the patch.
TagsNo tags attached.
Fixed in Revision43193
LazTarget1.2
Widgetset
Attached Files
  • cairocanvas.patch (11,137 bytes)
    Index: cairocanvas.pas
    ===================================================================
    --- cairocanvas.pas	(revision 41768)
    +++ cairocanvas.pas	(working copy)
    @@ -77,6 +77,7 @@
         procedure CreateFont; override;
         procedure CreateHandle; override;
         procedure CreatePen; override;
    +    procedure CreateRegion; override;
         procedure RealizeAntialiasing; override;
         procedure DestroyHandle;
       public
    @@ -221,9 +222,10 @@
       end;
     var
       cap: cairo_line_cap_t;
    +   w: double;
     begin
       SetSourceColor(Pen.Color);
    -(*  case Pen.Mode of
    +  case Pen.Mode of
         pmBlack: begin
           SetSourceColor(clBlack);
           cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
    @@ -249,8 +251,12 @@
         pmNotMask,}
       else
         cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
    -  end;*)
    -  cairo_set_line_width(cr, Pen.Width*ScaleX); //line_width is diameter of the pen circle
    +  end;
    +  w := Pen.Width;
    +  if w = 0 then
    +    w := 0.5;
    +  w := w * ScaleY;
    +  cairo_set_line_width(cr, w); //line_width is diameter of the pen circle
     
       case Pen.Style of
         psSolid:      cairo_set_dash(cr, nil, 0, 0);
    @@ -341,6 +347,7 @@
     begin
       inherited EndDoc;
       cairo_show_page(cr);
    +  FLazClipRect := Rect(0, 0, 0, 0);
       //if caller is printer, then at the end destroy cairo handles (flush output)
       //and establishes CreateCairoHandle call on the next print
       Handle := 0;
    @@ -371,6 +378,10 @@
     begin
     end;
     
    +procedure TCairoPrinterCanvas.CreateRegion;
    +begin
    +end;
    +
     procedure TCairoPrinterCanvas.RealizeAntialiasing;
     begin
     end;
    @@ -979,24 +990,24 @@
         te: cairo_text_extents_t;
       begin
         if en>=0 then begin
    -      if en>1 then begin
    +      //if en>1 then begin
             if en <= len then
               CurLine.EndL := en
             else
               CurLine.EndL := len;
    -      end else
    -        CurLine.EndL := 1;
    +      //end else
    +        //CurLine.EndL := 1;
           s1 := Copy(s, CurLine.Start, CurLine.EndL-CurLine.Start+1);
           cairo_text_extents(cr, PChar(s1), @te);
    -      CurLine.Width := te.width + te.x_bearing;
    +      CurLine.Width := te.width;
         end;
         if st > 0 then begin
           CurLine := TLine.Create;
           Lines.Add(CurLine);
    -      if st <= len then
    -        CurLine.Start := st
    -      else
    -        CurLine.Start := len;
    +      //if st <= len then
    +        CurLine.Start := st;
    +      //else
    +      //  CurLine.Start := len;
           CurLine.EndL := 0;
         end;
         LastBreakEndL := 0;
    @@ -1250,6 +1261,7 @@
       theRect: TPangoRectangle;
       {$endif}
     begin
    +  RequiredState([csHandleValid, csFontValid]);
       SelectFont;
       {$ifdef pangocairo}
       Layout := Pango_Cairo_Create_Layout(cr);
    @@ -1271,6 +1283,7 @@
     var
       e: cairo_font_extents_t;
     begin
    +  RequiredState([csHandleValid, csFontValid]);
       SelectFont;
       cairo_font_extents(cr, @e); //transformation matrix is here ignored
       FillChar(M{%H-}, SizeOf(M), 0);
    @@ -1280,12 +1293,58 @@
       Result := True;
     end;
     
    +resourcestring
    +  resImgSurfaceError = 'Cairo image surface error %d';
    +
    +{
    +function WritePNGFunc(closure: Pointer; data: PByte; length: LongWord): cairo_status_t; cdecl;
    +begin
    +  Result := CAIRO_STATUS_SUCCESS;
    +  try
    +    TStream(closure).Write(data^, length);
    +  except
    +    Result := CAIRO_STATUS_WRITE_ERROR;
    +  end;
    +end;
    +}
    +
     procedure TCairoPrinterCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
    +
    +  function TranslateBufferByIntfImage(buf: PByte; W, H: Integer): Boolean;
    +  var
    +    p: PDWord;
    +    x, y: Integer;
    +    c: TFPColor;
    +    Img: TLazIntfImage;
    +  begin
    +    Img := TRasterImage(SrcGraphic).CreateIntfImage;
    +    try
    +      if Img.DataDescription.Format=ricfNone then begin
    +        Result := False;
    +        Exit;
    +      end;
    +      p := Pointer(buf);
    +      for y := 0 to H-1 do begin
    +        for x := 0 to W-1 do begin
    +          c := Img.Colors[x, y];
    +          p^ := Hi(c.alpha) shl 24 + Hi(c.red) shl 16 + Hi(c.green) shl 8 + Hi(c.blue);
    +          inc(p);
    +        end;
    +      end;
    +    finally
    +      Img.Free;
    +    end;
    +    Result := True;
    +  end;
    +
     var
       sf: Pcairo_surface_t;
       buf: PByte;
       W, H: Integer;
       SW, SH: Double;
    +  fmt: cairo_format_t;
    +  stride: Integer;
    +  stat: cairo_status_t;
     begin
       if not (SrcGraphic is TRasterImage) then begin
         inherited StretchDraw(DestRect, SrcGraphic);
    @@ -1297,24 +1356,54 @@
       W := SrcGraphic.Width;
       H := SrcGraphic.Height;
     
    -  buf := GetMem(W*H*4);
    +  cairo_save(cr);
    +  fmt := CAIRO_FORMAT_ARGB32;
    +  stride := W*4;
    +  //stride := cairo_format_stride_for_width(fmt, W);
    +  buf := GetMem(H*stride);
       try
    -    cairo_save(cr);
    -    //FillDWord(buf^, W*H, $00000000);
    -    if not GraphicToARGB32(SrcGraphic, buf) then
    +
    +    //FillDWord(buf^, W*H, $ffffffff);
    +    if not TranslateBufferByIntfImage(buf, W, H) then
           Exit;
    +    //FillDWord(buf^, W*H, $ffffffff); //White box
    +    //FillDWord(buf^, W*H, $ff000000); //Black box
    +    //FillDWord(buf^, W*H, $ffff0000); //Red box
     
    -    sf := cairo_image_surface_create_for_data(buf, CAIRO_FORMAT_ARGB32, W, H, W*4);
    -    cairo_translate(cr, SX(DestRect.Left), SY(DestRect.Top));
    -    SW := (DestRect.Right - DestRect.Left)/W;
    -    SH := (DestRect.Bottom - DestRect.Top)/H;
    -    cairo_scale(cr, SX2(SW), SY2(SH));
    -    cairo_set_source_surface(cr, sf, 0, 0);
    -    cairo_paint(cr);
    -    cairo_surface_destroy(sf);
    -    cairo_restore(cr);
    +    sf := cairo_image_surface_create_for_data(buf, fmt, W, H, stride);
    +    try
    +
    +      {sf := cairo_image_surface_create_from_png('/home/petr/winparte4/system/obrazky/mesic01.png');
    +      W := cairo_image_surface_get_width(sf);
    +      H := cairo_image_surface_get_height(sf);
    +      fmt := cairo_image_surface_get_format(sf);
    +      stride := cairo_image_surface_get_stride(sf);}
    +
    +      stat := cairo_surface_status(sf);
    +      if stat <> CAIRO_STATUS_SUCCESS then
    +        raise Exception.CreateFmt(resImgSurfaceError, [stat]);
    +
    +      {st := TFileStream.Create('/home/petr/tmp/img.png', fmOpenWrite, 666);
    +      try
    +        cairo_surface_write_to_png_stream (sf, @WritePNGFunc, st);
    +      finally
    +        st.Free;
    +      end;}
    +
    +      cairo_translate(cr, SX(DestRect.Left), SY(DestRect.Top));
    +      SW := (DestRect.Right - DestRect.Left)/W;
    +      SH := (DestRect.Bottom - DestRect.Top)/H;
    +      cairo_scale(cr, SX(SW), SY(SH));
    +      cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
    +      cairo_set_source_surface(cr, sf, 0, 0);
    +      cairo_paint(cr);
    +    finally
    +      cairo_surface_finish(sf);
    +      cairo_surface_destroy(sf);
    +    end;
       finally
         FreeMem(buf);
    +    cairo_restore(cr);
       end;
       Changed;
     end;
    @@ -1412,8 +1501,7 @@
       W, H: Double;
       acr: Pcairo_t;
     begin
    -
    -  if Orientation = poLandscape then begin
    +  if Orientation in [poLandscape, poReverseLandscape] then begin
         s := '%%PageOrientation: Landscape';
         W := PaperHeight*ScaleY; //switch H, W
         H := PaperWidth*ScaleX;
    @@ -1433,11 +1521,21 @@
       cairo_ps_surface_dsc_begin_setup(sf);
       cairo_ps_surface_dsc_comment(sf, PChar(s));
     
    -  if Orientation = poLandscape then begin //rotate and move
    -    cairo_translate(acr, 0, H);
    -    cairo_rotate(acr, -PI/2);
    +  //rotate and move
    +  case Orientation of
    +    poLandscape: begin
    +      cairo_translate(acr, 0, H);
    +      cairo_rotate(acr, -PI/2);
    +    end;
    +    poReverseLandscape: begin
    +      cairo_translate(acr, W, 0);
    +      cairo_rotate(acr, PI/2);
    +    end;
    +    poReversePortrait: begin
    +      cairo_translate(acr, W, H);
    +      cairo_rotate(acr, PI);
    +    end;
       end;
    -
       result := {%H-}HDC(acr);
     end;
     
    Index: win/win32cairocanvas.pas
    ===================================================================
    --- win/win32cairocanvas.pas	(revision 41768)
    +++ win/win32cairocanvas.pas	(working copy)
    @@ -12,7 +12,8 @@
     
       TWin32CairoCanvas = class(TCairoControlCanvas)
       protected
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
    +    function CreateCairoHandle: HDC; override;
    +    procedure SetHandle(NewHandle: HDC); override;
       end;
     
     implementation
    @@ -22,13 +23,20 @@
     
     { TWin32CairoCanvas }
     
    -procedure TWin32CairoCanvas.CreateCairoHandle(BaseHandle: HDC);
    +function TWin32CairoCanvas.CreateCairoHandle: HDC;
     begin
    -  inherited;
    -  sf := cairo_win32_surface_create(BaseHandle);
    -  cr := cairo_create(sf);
    +  Result := 0; //Fake handle, right Handle is setted in SetHandle func
     end;
     
    +procedure TWin32CairoCanvas.SetHandle(NewHandle: HDC);
    +begin
    +  if NewHandle <> 0 then begin
    +    sf := cairo_win32_surface_create(NewHandle);
    +    NewHandle := {%H-}HDC(cairo_create(sf));
    +  end;
    +  inherited SetHandle(NewHandle);
    +end;
    +
     initialization
       CairoGraphicControlCanvasClass := TWin32CairoCanvas;
     
    Index: cairographics.pas
    ===================================================================
    --- cairographics.pas	(revision 41768)
    +++ cairographics.pas	(working copy)
    @@ -87,7 +87,6 @@
         sf: Pcairo_surface_t;
         FControl: TCairoGraphicControl;
         FDeviceContext: HDC;
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
         procedure DestroyCairoHandle; override;
       public
         procedure CreateHandle; override;
    @@ -192,15 +191,6 @@
       end;
     end;
     
    -procedure TCairoControlCanvas.CreateCairoHandle(BaseHandle: HDC);
    -begin
    -  inherited CreateCairoHandle(BaseHandle);
    -  SurfaceXDPI := GetDeviceCaps(BaseHandle, LOGPIXELSX);
    -  SurfaceYDPI := GetDeviceCaps(BaseHandle, LOGPIXELSY);
    -  XDPI := SurfaceXDPI;
    -  YDPI := SurfaceXDPI;
    -end;
    -
     procedure TCairoControlCanvas.DestroyCairoHandle;
     begin
       cairo_surface_destroy(sf);
    @@ -213,13 +203,19 @@
       inherited CreateHandle;
       if FDeviceContext = 0 then //Store it locally, what was Geted must be Released
         FDeviceContext := FControl.GetDCHandle;
    -  Handle := FDeviceContext;
    +  SetHandle(FDeviceContext);
    +  SurfaceXDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSX);
    +  SurfaceYDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSY);
    +  XDPI := SurfaceXDPI;
    +  YDPI := SurfaceXDPI;
     end;
     
     procedure TCairoControlCanvas.FreeHandle;
     begin
    -  if FDeviceContext <> 0 then
    +  if FDeviceContext <> 0 then begin
         FControl.ReleaseDCHandle(FDeviceContext);
    +    FDeviceContext := 0;
    +  end;
       inherited FreeHandle;
     end;
     
    Index: unix/gdkcairocanvas.pas
    ===================================================================
    --- unix/gdkcairocanvas.pas	(revision 41768)
    +++ unix/gdkcairocanvas.pas	(working copy)
    @@ -12,19 +12,26 @@
     
       TGdkCairoCanvas = class(TCairoControlCanvas)
       protected
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
    +    procedure SetHandle(NewHandle: HDC); override;
    +    function CreateCairoHandle: HDC; override;
       end;
     
     implementation
     
     { TGdkCairoCanvas }
     
    -procedure TGdkCairoCanvas.CreateCairoHandle(BaseHandle: HDC);
    +function TGdkCairoCanvas.CreateCairoHandle: HDC;
     begin
    -  inherited;
    -  cr := gdk_cairo_create(TGtk2DeviceContext(BaseHandle).Drawable);
    +  Result := 0; //Fake handle, right Handle is setted in SetHandle func
     end;
     
    +procedure TGdkCairoCanvas.SetHandle(NewHandle: HDC);
    +begin
    +  if NewHandle <> 0 then
    +    NewHandle := {%H-}HDC(gdk_cairo_create(TGtk2DeviceContext(NewHandle).Drawable));
    +  inherited SetHandle(NewHandle);
    +end;
    +
     initialization
       CairoGraphicControlCanvasClass := TGdkCairoCanvas;
     
    
    cairocanvas.patch (11,137 bytes)
  • cairocanvas2.patch (7,441 bytes)
    Index: win/win32cairocanvas.pas
    ===================================================================
    --- win/win32cairocanvas.pas	(revision 42516)
    +++ win/win32cairocanvas.pas	(working copy)
    @@ -12,7 +12,8 @@
     
       TWin32CairoCanvas = class(TCairoControlCanvas)
       protected
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
    +    function CreateCairoHandle: HDC; override;
    +    procedure SetHandle(NewHandle: HDC); override;
       end;
     
     implementation
    @@ -22,13 +23,20 @@
     
     { TWin32CairoCanvas }
     
    -procedure TWin32CairoCanvas.CreateCairoHandle(BaseHandle: HDC);
    +function TWin32CairoCanvas.CreateCairoHandle: HDC;
     begin
    -  inherited;
    -  sf := cairo_win32_surface_create(BaseHandle);
    -  cr := cairo_create(sf);
    +  Result := 0; //Fake handle, right Handle is setted in SetHandle func
     end;
     
    +procedure TWin32CairoCanvas.SetHandle(NewHandle: HDC);
    +begin
    +  if NewHandle <> 0 then begin
    +    sf := cairo_win32_surface_create(NewHandle);
    +    NewHandle := {%H-}HDC(cairo_create(sf));
    +  end;
    +  inherited SetHandle(NewHandle);
    +end;
    +
     initialization
       CairoGraphicControlCanvasClass := TWin32CairoCanvas;
     
    Index: cairographics.pas
    ===================================================================
    --- cairographics.pas	(revision 42516)
    +++ cairographics.pas	(working copy)
    @@ -87,7 +87,6 @@
         sf: Pcairo_surface_t;
         FControl: TCairoGraphicControl;
         FDeviceContext: HDC;
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
         procedure DestroyCairoHandle; override;
       public
         procedure CreateHandle; override;
    @@ -192,15 +191,6 @@
       end;
     end;
     
    -procedure TCairoControlCanvas.CreateCairoHandle(BaseHandle: HDC);
    -begin
    -  inherited CreateCairoHandle(BaseHandle);
    -  SurfaceXDPI := GetDeviceCaps(BaseHandle, LOGPIXELSX);
    -  SurfaceYDPI := GetDeviceCaps(BaseHandle, LOGPIXELSY);
    -  XDPI := SurfaceXDPI;
    -  YDPI := SurfaceXDPI;
    -end;
    -
     procedure TCairoControlCanvas.DestroyCairoHandle;
     begin
       cairo_surface_destroy(sf);
    @@ -213,13 +203,19 @@
       inherited CreateHandle;
       if FDeviceContext = 0 then //Store it locally, what was Geted must be Released
         FDeviceContext := FControl.GetDCHandle;
    -  Handle := FDeviceContext;
    +  SetHandle(FDeviceContext);
    +  SurfaceXDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSX);
    +  SurfaceYDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSY);
    +  XDPI := SurfaceXDPI;
    +  YDPI := SurfaceXDPI;
     end;
     
     procedure TCairoControlCanvas.FreeHandle;
     begin
    -  if FDeviceContext <> 0 then
    +  if FDeviceContext <> 0 then begin
         FControl.ReleaseDCHandle(FDeviceContext);
    +    FDeviceContext := 0;
    +  end;
       inherited FreeHandle;
     end;
     
    Index: unix/gdkcairocanvas.pas
    ===================================================================
    --- unix/gdkcairocanvas.pas	(revision 42516)
    +++ unix/gdkcairocanvas.pas	(working copy)
    @@ -12,19 +12,26 @@
     
       TGdkCairoCanvas = class(TCairoControlCanvas)
       protected
    -    procedure CreateCairoHandle(BaseHandle: HDC); override;
    +    procedure SetHandle(NewHandle: HDC); override;
    +    function CreateCairoHandle: HDC; override;
       end;
     
     implementation
     
     { TGdkCairoCanvas }
     
    -procedure TGdkCairoCanvas.CreateCairoHandle(BaseHandle: HDC);
    +function TGdkCairoCanvas.CreateCairoHandle: HDC;
     begin
    -  inherited;
    -  cr := gdk_cairo_create(TGtk2DeviceContext(BaseHandle).Drawable);
    +  Result := 0; //Fake handle, right Handle is setted in SetHandle func
     end;
     
    +procedure TGdkCairoCanvas.SetHandle(NewHandle: HDC);
    +begin
    +  if NewHandle <> 0 then
    +    NewHandle := {%H-}HDC(gdk_cairo_create(TGtk2DeviceContext(NewHandle).Drawable));
    +  inherited SetHandle(NewHandle);
    +end;
    +
     initialization
       CairoGraphicControlCanvasClass := TGdkCairoCanvas;
     
    Index: cairocanvas.pas
    ===================================================================
    --- cairocanvas.pas	(revision 42516)
    +++ cairocanvas.pas	(working copy)
    @@ -77,6 +77,7 @@
         procedure CreateFont; override;
         procedure CreateHandle; override;
         procedure CreatePen; override;
    +    procedure CreateRegion; override;
         procedure RealizeAntialiasing; override;
         procedure DestroyHandle;
       public
    @@ -221,9 +222,10 @@
       end;
     var
       cap: cairo_line_cap_t;
    +   w: double;
     begin
       SetSourceColor(Pen.Color);
    -(*  case Pen.Mode of
    +  case Pen.Mode of
         pmBlack: begin
           SetSourceColor(clBlack);
           cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
    @@ -249,8 +251,12 @@
         pmNotMask,}
       else
         cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
    -  end;*)
    -  cairo_set_line_width(cr, Pen.Width*ScaleX); //line_width is diameter of the pen circle
    +  end;
    +  w := Pen.Width;
    +  if w = 0 then
    +    w := 0.5;
    +  w := w * ScaleY;
    +  cairo_set_line_width(cr, w); //line_width is diameter of the pen circle
     
       case Pen.Style of
         psSolid:      cairo_set_dash(cr, nil, 0, 0);
    @@ -341,6 +347,7 @@
     begin
       inherited EndDoc;
       cairo_show_page(cr);
    +  FLazClipRect := Rect(0, 0, 0, 0);
       //if caller is printer, then at the end destroy cairo handles (flush output)
       //and establishes CreateCairoHandle call on the next print
       Handle := 0;
    @@ -371,6 +378,10 @@
     begin
     end;
     
    +procedure TCairoPrinterCanvas.CreateRegion;
    +begin
    +end;
    +
     procedure TCairoPrinterCanvas.RealizeAntialiasing;
     begin
     end;
    @@ -979,24 +990,24 @@
         te: cairo_text_extents_t;
       begin
         if en>=0 then begin
    -      if en>1 then begin
    +      //if en>1 then begin
             if en <= len then
               CurLine.EndL := en
             else
               CurLine.EndL := len;
    -      end else
    -        CurLine.EndL := 1;
    +      //end else
    +        //CurLine.EndL := 1;
           s1 := Copy(s, CurLine.Start, CurLine.EndL-CurLine.Start+1);
           cairo_text_extents(cr, PChar(s1), @te);
    -      CurLine.Width := te.width + te.x_bearing;
    +      CurLine.Width := te.width;
         end;
         if st > 0 then begin
           CurLine := TLine.Create;
           Lines.Add(CurLine);
    -      if st <= len then
    -        CurLine.Start := st
    -      else
    -        CurLine.Start := len;
    +      //if st <= len then
    +        CurLine.Start := st;
    +      //else
    +      //  CurLine.Start := len;
           CurLine.EndL := 0;
         end;
         LastBreakEndL := 0;
    @@ -1250,6 +1261,7 @@
       theRect: TPangoRectangle;
       {$endif}
     begin
    +  RequiredState([csHandleValid, csFontValid]);
       SelectFont;
       {$ifdef pangocairo}
       Layout := Pango_Cairo_Create_Layout(cr);
    @@ -1271,6 +1283,7 @@
     var
       e: cairo_font_extents_t;
     begin
    +  RequiredState([csHandleValid, csFontValid]);
       SelectFont;
       cairo_font_extents(cr, @e); //transformation matrix is here ignored
       FillChar(M{%H-}, SizeOf(M), 0);
    @@ -1412,8 +1425,7 @@
       W, H: Double;
       acr: Pcairo_t;
     begin
    -
    -  if Orientation = poLandscape then begin
    +  if Orientation in [poLandscape, poReverseLandscape] then begin
         s := '%%PageOrientation: Landscape';
         W := PaperHeight*ScaleY; //switch H, W
         H := PaperWidth*ScaleX;
    @@ -1433,11 +1445,21 @@
       cairo_ps_surface_dsc_begin_setup(sf);
       cairo_ps_surface_dsc_comment(sf, PChar(s));
     
    -  if Orientation = poLandscape then begin //rotate and move
    -    cairo_translate(acr, 0, H);
    -    cairo_rotate(acr, -PI/2);
    +  //rotate and move
    +  case Orientation of
    +    poLandscape: begin
    +      cairo_translate(acr, 0, H);
    +      cairo_rotate(acr, -PI/2);
    +    end;
    +    poReverseLandscape: begin
    +      cairo_translate(acr, W, 0);
    +      cairo_rotate(acr, PI/2);
    +    end;
    +    poReversePortrait: begin
    +      cairo_translate(acr, W, H);
    +      cairo_rotate(acr, PI);
    +    end;
       end;
    -
       result := {%H-}HDC(acr);
     end;
     
    
    cairocanvas2.patch (7,441 bytes)

Activities

Petr-K

2013-06-25 14:48

reporter  

cairocanvas.patch (11,137 bytes)
Index: cairocanvas.pas
===================================================================
--- cairocanvas.pas	(revision 41768)
+++ cairocanvas.pas	(working copy)
@@ -77,6 +77,7 @@
     procedure CreateFont; override;
     procedure CreateHandle; override;
     procedure CreatePen; override;
+    procedure CreateRegion; override;
     procedure RealizeAntialiasing; override;
     procedure DestroyHandle;
   public
@@ -221,9 +222,10 @@
   end;
 var
   cap: cairo_line_cap_t;
+   w: double;
 begin
   SetSourceColor(Pen.Color);
-(*  case Pen.Mode of
+  case Pen.Mode of
     pmBlack: begin
       SetSourceColor(clBlack);
       cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
@@ -249,8 +251,12 @@
     pmNotMask,}
   else
     cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
-  end;*)
-  cairo_set_line_width(cr, Pen.Width*ScaleX); //line_width is diameter of the pen circle
+  end;
+  w := Pen.Width;
+  if w = 0 then
+    w := 0.5;
+  w := w * ScaleY;
+  cairo_set_line_width(cr, w); //line_width is diameter of the pen circle
 
   case Pen.Style of
     psSolid:      cairo_set_dash(cr, nil, 0, 0);
@@ -341,6 +347,7 @@
 begin
   inherited EndDoc;
   cairo_show_page(cr);
+  FLazClipRect := Rect(0, 0, 0, 0);
   //if caller is printer, then at the end destroy cairo handles (flush output)
   //and establishes CreateCairoHandle call on the next print
   Handle := 0;
@@ -371,6 +378,10 @@
 begin
 end;
 
+procedure TCairoPrinterCanvas.CreateRegion;
+begin
+end;
+
 procedure TCairoPrinterCanvas.RealizeAntialiasing;
 begin
 end;
@@ -979,24 +990,24 @@
     te: cairo_text_extents_t;
   begin
     if en>=0 then begin
-      if en>1 then begin
+      //if en>1 then begin
         if en <= len then
           CurLine.EndL := en
         else
           CurLine.EndL := len;
-      end else
-        CurLine.EndL := 1;
+      //end else
+        //CurLine.EndL := 1;
       s1 := Copy(s, CurLine.Start, CurLine.EndL-CurLine.Start+1);
       cairo_text_extents(cr, PChar(s1), @te);
-      CurLine.Width := te.width + te.x_bearing;
+      CurLine.Width := te.width;
     end;
     if st > 0 then begin
       CurLine := TLine.Create;
       Lines.Add(CurLine);
-      if st <= len then
-        CurLine.Start := st
-      else
-        CurLine.Start := len;
+      //if st <= len then
+        CurLine.Start := st;
+      //else
+      //  CurLine.Start := len;
       CurLine.EndL := 0;
     end;
     LastBreakEndL := 0;
@@ -1250,6 +1261,7 @@
   theRect: TPangoRectangle;
   {$endif}
 begin
+  RequiredState([csHandleValid, csFontValid]);
   SelectFont;
   {$ifdef pangocairo}
   Layout := Pango_Cairo_Create_Layout(cr);
@@ -1271,6 +1283,7 @@
 var
   e: cairo_font_extents_t;
 begin
+  RequiredState([csHandleValid, csFontValid]);
   SelectFont;
   cairo_font_extents(cr, @e); //transformation matrix is here ignored
   FillChar(M{%H-}, SizeOf(M), 0);
@@ -1280,12 +1293,58 @@
   Result := True;
 end;
 
+resourcestring
+  resImgSurfaceError = 'Cairo image surface error %d';
+
+{
+function WritePNGFunc(closure: Pointer; data: PByte; length: LongWord): cairo_status_t; cdecl;
+begin
+  Result := CAIRO_STATUS_SUCCESS;
+  try
+    TStream(closure).Write(data^, length);
+  except
+    Result := CAIRO_STATUS_WRITE_ERROR;
+  end;
+end;
+}
+
 procedure TCairoPrinterCanvas.StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic);
+
+  function TranslateBufferByIntfImage(buf: PByte; W, H: Integer): Boolean;
+  var
+    p: PDWord;
+    x, y: Integer;
+    c: TFPColor;
+    Img: TLazIntfImage;
+  begin
+    Img := TRasterImage(SrcGraphic).CreateIntfImage;
+    try
+      if Img.DataDescription.Format=ricfNone then begin
+        Result := False;
+        Exit;
+      end;
+      p := Pointer(buf);
+      for y := 0 to H-1 do begin
+        for x := 0 to W-1 do begin
+          c := Img.Colors[x, y];
+          p^ := Hi(c.alpha) shl 24 + Hi(c.red) shl 16 + Hi(c.green) shl 8 + Hi(c.blue);
+          inc(p);
+        end;
+      end;
+    finally
+      Img.Free;
+    end;
+    Result := True;
+  end;
+
 var
   sf: Pcairo_surface_t;
   buf: PByte;
   W, H: Integer;
   SW, SH: Double;
+  fmt: cairo_format_t;
+  stride: Integer;
+  stat: cairo_status_t;
 begin
   if not (SrcGraphic is TRasterImage) then begin
     inherited StretchDraw(DestRect, SrcGraphic);
@@ -1297,24 +1356,54 @@
   W := SrcGraphic.Width;
   H := SrcGraphic.Height;
 
-  buf := GetMem(W*H*4);
+  cairo_save(cr);
+  fmt := CAIRO_FORMAT_ARGB32;
+  stride := W*4;
+  //stride := cairo_format_stride_for_width(fmt, W);
+  buf := GetMem(H*stride);
   try
-    cairo_save(cr);
-    //FillDWord(buf^, W*H, $00000000);
-    if not GraphicToARGB32(SrcGraphic, buf) then
+
+    //FillDWord(buf^, W*H, $ffffffff);
+    if not TranslateBufferByIntfImage(buf, W, H) then
       Exit;
+    //FillDWord(buf^, W*H, $ffffffff); //White box
+    //FillDWord(buf^, W*H, $ff000000); //Black box
+    //FillDWord(buf^, W*H, $ffff0000); //Red box
 
-    sf := cairo_image_surface_create_for_data(buf, CAIRO_FORMAT_ARGB32, W, H, W*4);
-    cairo_translate(cr, SX(DestRect.Left), SY(DestRect.Top));
-    SW := (DestRect.Right - DestRect.Left)/W;
-    SH := (DestRect.Bottom - DestRect.Top)/H;
-    cairo_scale(cr, SX2(SW), SY2(SH));
-    cairo_set_source_surface(cr, sf, 0, 0);
-    cairo_paint(cr);
-    cairo_surface_destroy(sf);
-    cairo_restore(cr);
+    sf := cairo_image_surface_create_for_data(buf, fmt, W, H, stride);
+    try
+
+      {sf := cairo_image_surface_create_from_png('/home/petr/winparte4/system/obrazky/mesic01.png');
+      W := cairo_image_surface_get_width(sf);
+      H := cairo_image_surface_get_height(sf);
+      fmt := cairo_image_surface_get_format(sf);
+      stride := cairo_image_surface_get_stride(sf);}
+
+      stat := cairo_surface_status(sf);
+      if stat <> CAIRO_STATUS_SUCCESS then
+        raise Exception.CreateFmt(resImgSurfaceError, [stat]);
+
+      {st := TFileStream.Create('/home/petr/tmp/img.png', fmOpenWrite, 666);
+      try
+        cairo_surface_write_to_png_stream (sf, @WritePNGFunc, st);
+      finally
+        st.Free;
+      end;}
+
+      cairo_translate(cr, SX(DestRect.Left), SY(DestRect.Top));
+      SW := (DestRect.Right - DestRect.Left)/W;
+      SH := (DestRect.Bottom - DestRect.Top)/H;
+      cairo_scale(cr, SX(SW), SY(SH));
+      cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+      cairo_set_source_surface(cr, sf, 0, 0);
+      cairo_paint(cr);
+    finally
+      cairo_surface_finish(sf);
+      cairo_surface_destroy(sf);
+    end;
   finally
     FreeMem(buf);
+    cairo_restore(cr);
   end;
   Changed;
 end;
@@ -1412,8 +1501,7 @@
   W, H: Double;
   acr: Pcairo_t;
 begin
-
-  if Orientation = poLandscape then begin
+  if Orientation in [poLandscape, poReverseLandscape] then begin
     s := '%%PageOrientation: Landscape';
     W := PaperHeight*ScaleY; //switch H, W
     H := PaperWidth*ScaleX;
@@ -1433,11 +1521,21 @@
   cairo_ps_surface_dsc_begin_setup(sf);
   cairo_ps_surface_dsc_comment(sf, PChar(s));
 
-  if Orientation = poLandscape then begin //rotate and move
-    cairo_translate(acr, 0, H);
-    cairo_rotate(acr, -PI/2);
+  //rotate and move
+  case Orientation of
+    poLandscape: begin
+      cairo_translate(acr, 0, H);
+      cairo_rotate(acr, -PI/2);
+    end;
+    poReverseLandscape: begin
+      cairo_translate(acr, W, 0);
+      cairo_rotate(acr, PI/2);
+    end;
+    poReversePortrait: begin
+      cairo_translate(acr, W, H);
+      cairo_rotate(acr, PI);
+    end;
   end;
-
   result := {%H-}HDC(acr);
 end;
 
Index: win/win32cairocanvas.pas
===================================================================
--- win/win32cairocanvas.pas	(revision 41768)
+++ win/win32cairocanvas.pas	(working copy)
@@ -12,7 +12,8 @@
 
   TWin32CairoCanvas = class(TCairoControlCanvas)
   protected
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
+    function CreateCairoHandle: HDC; override;
+    procedure SetHandle(NewHandle: HDC); override;
   end;
 
 implementation
@@ -22,13 +23,20 @@
 
 { TWin32CairoCanvas }
 
-procedure TWin32CairoCanvas.CreateCairoHandle(BaseHandle: HDC);
+function TWin32CairoCanvas.CreateCairoHandle: HDC;
 begin
-  inherited;
-  sf := cairo_win32_surface_create(BaseHandle);
-  cr := cairo_create(sf);
+  Result := 0; //Fake handle, right Handle is setted in SetHandle func
 end;
 
+procedure TWin32CairoCanvas.SetHandle(NewHandle: HDC);
+begin
+  if NewHandle <> 0 then begin
+    sf := cairo_win32_surface_create(NewHandle);
+    NewHandle := {%H-}HDC(cairo_create(sf));
+  end;
+  inherited SetHandle(NewHandle);
+end;
+
 initialization
   CairoGraphicControlCanvasClass := TWin32CairoCanvas;
 
Index: cairographics.pas
===================================================================
--- cairographics.pas	(revision 41768)
+++ cairographics.pas	(working copy)
@@ -87,7 +87,6 @@
     sf: Pcairo_surface_t;
     FControl: TCairoGraphicControl;
     FDeviceContext: HDC;
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
     procedure DestroyCairoHandle; override;
   public
     procedure CreateHandle; override;
@@ -192,15 +191,6 @@
   end;
 end;
 
-procedure TCairoControlCanvas.CreateCairoHandle(BaseHandle: HDC);
-begin
-  inherited CreateCairoHandle(BaseHandle);
-  SurfaceXDPI := GetDeviceCaps(BaseHandle, LOGPIXELSX);
-  SurfaceYDPI := GetDeviceCaps(BaseHandle, LOGPIXELSY);
-  XDPI := SurfaceXDPI;
-  YDPI := SurfaceXDPI;
-end;
-
 procedure TCairoControlCanvas.DestroyCairoHandle;
 begin
   cairo_surface_destroy(sf);
@@ -213,13 +203,19 @@
   inherited CreateHandle;
   if FDeviceContext = 0 then //Store it locally, what was Geted must be Released
     FDeviceContext := FControl.GetDCHandle;
-  Handle := FDeviceContext;
+  SetHandle(FDeviceContext);
+  SurfaceXDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSX);
+  SurfaceYDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSY);
+  XDPI := SurfaceXDPI;
+  YDPI := SurfaceXDPI;
 end;
 
 procedure TCairoControlCanvas.FreeHandle;
 begin
-  if FDeviceContext <> 0 then
+  if FDeviceContext <> 0 then begin
     FControl.ReleaseDCHandle(FDeviceContext);
+    FDeviceContext := 0;
+  end;
   inherited FreeHandle;
 end;
 
Index: unix/gdkcairocanvas.pas
===================================================================
--- unix/gdkcairocanvas.pas	(revision 41768)
+++ unix/gdkcairocanvas.pas	(working copy)
@@ -12,19 +12,26 @@
 
   TGdkCairoCanvas = class(TCairoControlCanvas)
   protected
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
+    procedure SetHandle(NewHandle: HDC); override;
+    function CreateCairoHandle: HDC; override;
   end;
 
 implementation
 
 { TGdkCairoCanvas }
 
-procedure TGdkCairoCanvas.CreateCairoHandle(BaseHandle: HDC);
+function TGdkCairoCanvas.CreateCairoHandle: HDC;
 begin
-  inherited;
-  cr := gdk_cairo_create(TGtk2DeviceContext(BaseHandle).Drawable);
+  Result := 0; //Fake handle, right Handle is setted in SetHandle func
 end;
 
+procedure TGdkCairoCanvas.SetHandle(NewHandle: HDC);
+begin
+  if NewHandle <> 0 then
+    NewHandle := {%H-}HDC(gdk_cairo_create(TGtk2DeviceContext(NewHandle).Drawable));
+  inherited SetHandle(NewHandle);
+end;
+
 initialization
   CairoGraphicControlCanvasClass := TGdkCairoCanvas;
 
cairocanvas.patch (11,137 bytes)

Jesus Reyes

2013-10-07 21:21

developer   ~0070635

Hello Petr, I'm reviewing the patch I see not big problem, but I wanted to check why do you modified the TCairoPrinterCanvas.StretchDraw procedure? why not ammed the current implementation which is mostly the same as your patch? Maybe the current implementation has bugs that we have not noted?

Petr-K

2013-10-09 16:55

reporter   ~0070697

You are right. TCairoPrinterCanvas.StretchDraw is almost the same. I miss it when the patch was created. I attach cairocanvas2.patch without these unimportant modifications.

Petr-K

2013-10-09 16:56

reporter  

cairocanvas2.patch (7,441 bytes)
Index: win/win32cairocanvas.pas
===================================================================
--- win/win32cairocanvas.pas	(revision 42516)
+++ win/win32cairocanvas.pas	(working copy)
@@ -12,7 +12,8 @@
 
   TWin32CairoCanvas = class(TCairoControlCanvas)
   protected
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
+    function CreateCairoHandle: HDC; override;
+    procedure SetHandle(NewHandle: HDC); override;
   end;
 
 implementation
@@ -22,13 +23,20 @@
 
 { TWin32CairoCanvas }
 
-procedure TWin32CairoCanvas.CreateCairoHandle(BaseHandle: HDC);
+function TWin32CairoCanvas.CreateCairoHandle: HDC;
 begin
-  inherited;
-  sf := cairo_win32_surface_create(BaseHandle);
-  cr := cairo_create(sf);
+  Result := 0; //Fake handle, right Handle is setted in SetHandle func
 end;
 
+procedure TWin32CairoCanvas.SetHandle(NewHandle: HDC);
+begin
+  if NewHandle <> 0 then begin
+    sf := cairo_win32_surface_create(NewHandle);
+    NewHandle := {%H-}HDC(cairo_create(sf));
+  end;
+  inherited SetHandle(NewHandle);
+end;
+
 initialization
   CairoGraphicControlCanvasClass := TWin32CairoCanvas;
 
Index: cairographics.pas
===================================================================
--- cairographics.pas	(revision 42516)
+++ cairographics.pas	(working copy)
@@ -87,7 +87,6 @@
     sf: Pcairo_surface_t;
     FControl: TCairoGraphicControl;
     FDeviceContext: HDC;
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
     procedure DestroyCairoHandle; override;
   public
     procedure CreateHandle; override;
@@ -192,15 +191,6 @@
   end;
 end;
 
-procedure TCairoControlCanvas.CreateCairoHandle(BaseHandle: HDC);
-begin
-  inherited CreateCairoHandle(BaseHandle);
-  SurfaceXDPI := GetDeviceCaps(BaseHandle, LOGPIXELSX);
-  SurfaceYDPI := GetDeviceCaps(BaseHandle, LOGPIXELSY);
-  XDPI := SurfaceXDPI;
-  YDPI := SurfaceXDPI;
-end;
-
 procedure TCairoControlCanvas.DestroyCairoHandle;
 begin
   cairo_surface_destroy(sf);
@@ -213,13 +203,19 @@
   inherited CreateHandle;
   if FDeviceContext = 0 then //Store it locally, what was Geted must be Released
     FDeviceContext := FControl.GetDCHandle;
-  Handle := FDeviceContext;
+  SetHandle(FDeviceContext);
+  SurfaceXDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSX);
+  SurfaceYDPI := GetDeviceCaps(FDeviceContext, LOGPIXELSY);
+  XDPI := SurfaceXDPI;
+  YDPI := SurfaceXDPI;
 end;
 
 procedure TCairoControlCanvas.FreeHandle;
 begin
-  if FDeviceContext <> 0 then
+  if FDeviceContext <> 0 then begin
     FControl.ReleaseDCHandle(FDeviceContext);
+    FDeviceContext := 0;
+  end;
   inherited FreeHandle;
 end;
 
Index: unix/gdkcairocanvas.pas
===================================================================
--- unix/gdkcairocanvas.pas	(revision 42516)
+++ unix/gdkcairocanvas.pas	(working copy)
@@ -12,19 +12,26 @@
 
   TGdkCairoCanvas = class(TCairoControlCanvas)
   protected
-    procedure CreateCairoHandle(BaseHandle: HDC); override;
+    procedure SetHandle(NewHandle: HDC); override;
+    function CreateCairoHandle: HDC; override;
   end;
 
 implementation
 
 { TGdkCairoCanvas }
 
-procedure TGdkCairoCanvas.CreateCairoHandle(BaseHandle: HDC);
+function TGdkCairoCanvas.CreateCairoHandle: HDC;
 begin
-  inherited;
-  cr := gdk_cairo_create(TGtk2DeviceContext(BaseHandle).Drawable);
+  Result := 0; //Fake handle, right Handle is setted in SetHandle func
 end;
 
+procedure TGdkCairoCanvas.SetHandle(NewHandle: HDC);
+begin
+  if NewHandle <> 0 then
+    NewHandle := {%H-}HDC(gdk_cairo_create(TGtk2DeviceContext(NewHandle).Drawable));
+  inherited SetHandle(NewHandle);
+end;
+
 initialization
   CairoGraphicControlCanvasClass := TGdkCairoCanvas;
 
Index: cairocanvas.pas
===================================================================
--- cairocanvas.pas	(revision 42516)
+++ cairocanvas.pas	(working copy)
@@ -77,6 +77,7 @@
     procedure CreateFont; override;
     procedure CreateHandle; override;
     procedure CreatePen; override;
+    procedure CreateRegion; override;
     procedure RealizeAntialiasing; override;
     procedure DestroyHandle;
   public
@@ -221,9 +222,10 @@
   end;
 var
   cap: cairo_line_cap_t;
+   w: double;
 begin
   SetSourceColor(Pen.Color);
-(*  case Pen.Mode of
+  case Pen.Mode of
     pmBlack: begin
       SetSourceColor(clBlack);
       cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
@@ -249,8 +251,12 @@
     pmNotMask,}
   else
     cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
-  end;*)
-  cairo_set_line_width(cr, Pen.Width*ScaleX); //line_width is diameter of the pen circle
+  end;
+  w := Pen.Width;
+  if w = 0 then
+    w := 0.5;
+  w := w * ScaleY;
+  cairo_set_line_width(cr, w); //line_width is diameter of the pen circle
 
   case Pen.Style of
     psSolid:      cairo_set_dash(cr, nil, 0, 0);
@@ -341,6 +347,7 @@
 begin
   inherited EndDoc;
   cairo_show_page(cr);
+  FLazClipRect := Rect(0, 0, 0, 0);
   //if caller is printer, then at the end destroy cairo handles (flush output)
   //and establishes CreateCairoHandle call on the next print
   Handle := 0;
@@ -371,6 +378,10 @@
 begin
 end;
 
+procedure TCairoPrinterCanvas.CreateRegion;
+begin
+end;
+
 procedure TCairoPrinterCanvas.RealizeAntialiasing;
 begin
 end;
@@ -979,24 +990,24 @@
     te: cairo_text_extents_t;
   begin
     if en>=0 then begin
-      if en>1 then begin
+      //if en>1 then begin
         if en <= len then
           CurLine.EndL := en
         else
           CurLine.EndL := len;
-      end else
-        CurLine.EndL := 1;
+      //end else
+        //CurLine.EndL := 1;
       s1 := Copy(s, CurLine.Start, CurLine.EndL-CurLine.Start+1);
       cairo_text_extents(cr, PChar(s1), @te);
-      CurLine.Width := te.width + te.x_bearing;
+      CurLine.Width := te.width;
     end;
     if st > 0 then begin
       CurLine := TLine.Create;
       Lines.Add(CurLine);
-      if st <= len then
-        CurLine.Start := st
-      else
-        CurLine.Start := len;
+      //if st <= len then
+        CurLine.Start := st;
+      //else
+      //  CurLine.Start := len;
       CurLine.EndL := 0;
     end;
     LastBreakEndL := 0;
@@ -1250,6 +1261,7 @@
   theRect: TPangoRectangle;
   {$endif}
 begin
+  RequiredState([csHandleValid, csFontValid]);
   SelectFont;
   {$ifdef pangocairo}
   Layout := Pango_Cairo_Create_Layout(cr);
@@ -1271,6 +1283,7 @@
 var
   e: cairo_font_extents_t;
 begin
+  RequiredState([csHandleValid, csFontValid]);
   SelectFont;
   cairo_font_extents(cr, @e); //transformation matrix is here ignored
   FillChar(M{%H-}, SizeOf(M), 0);
@@ -1412,8 +1425,7 @@
   W, H: Double;
   acr: Pcairo_t;
 begin
-
-  if Orientation = poLandscape then begin
+  if Orientation in [poLandscape, poReverseLandscape] then begin
     s := '%%PageOrientation: Landscape';
     W := PaperHeight*ScaleY; //switch H, W
     H := PaperWidth*ScaleX;
@@ -1433,11 +1445,21 @@
   cairo_ps_surface_dsc_begin_setup(sf);
   cairo_ps_surface_dsc_comment(sf, PChar(s));
 
-  if Orientation = poLandscape then begin //rotate and move
-    cairo_translate(acr, 0, H);
-    cairo_rotate(acr, -PI/2);
+  //rotate and move
+  case Orientation of
+    poLandscape: begin
+      cairo_translate(acr, 0, H);
+      cairo_rotate(acr, -PI/2);
+    end;
+    poReverseLandscape: begin
+      cairo_translate(acr, W, 0);
+      cairo_rotate(acr, PI/2);
+    end;
+    poReversePortrait: begin
+      cairo_translate(acr, W, H);
+      cairo_rotate(acr, PI);
+    end;
   end;
-
   result := {%H-}HDC(acr);
 end;
 
cairocanvas2.patch (7,441 bytes)

Jesus Reyes

2013-10-09 19:58

developer   ~0070702

Thanks, Applied.

Petr-K

2014-01-02 11:26

reporter   ~0072173

Thanks

Issue History

Date Modified Username Field Change
2013-06-25 14:48 Petr-K New Issue
2013-06-25 14:48 Petr-K File Added: cairocanvas.patch
2013-06-25 15:24 Zeljan Rikalo Assigned To => Jesus Reyes
2013-06-25 15:24 Zeljan Rikalo Status new => assigned
2013-10-07 21:21 Jesus Reyes LazTarget => -
2013-10-07 21:21 Jesus Reyes Note Added: 0070635
2013-10-07 21:21 Jesus Reyes Status assigned => feedback
2013-10-09 16:55 Petr-K Note Added: 0070697
2013-10-09 16:55 Petr-K Status feedback => assigned
2013-10-09 16:56 Petr-K File Added: cairocanvas2.patch
2013-10-09 19:58 Jesus Reyes Fixed in Revision => 43193
2013-10-09 19:58 Jesus Reyes LazTarget - => 1.2
2013-10-09 19:58 Jesus Reyes Note Added: 0070702
2013-10-09 19:58 Jesus Reyes Status assigned => resolved
2013-10-09 19:58 Jesus Reyes Fixed in Version => 1.2.0
2013-10-09 19:58 Jesus Reyes Resolution open => fixed
2013-10-09 19:58 Jesus Reyes Target Version => 1.3 (SVN)
2014-01-02 11:26 Petr-K Note Added: 0072173
2014-01-02 11:26 Petr-K Status resolved => closed