From b0633c96d9201ee858ee98c8a609511815f85b80 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 15 Apr 2016 12:23:29 +0000 Subject: [PATCH] fpvectorial: adds possibility to disable newer gradient code git-svn-id: trunk@52200 - --- components/fpvectorial/fpvectorial.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/fpvectorial/fpvectorial.pas b/components/fpvectorial/fpvectorial.pas index 7230ab5dba..73bb2af08f 100644 --- a/components/fpvectorial/fpvectorial.pas +++ b/components/fpvectorial/fpvectorial.pas @@ -24,6 +24,7 @@ unit fpvectorial; {.$define FPVECTORIAL_TOCANVAS_DEBUG} {.$define FPVECTORIAL_DEBUG_BLOCKS} {.$define FPVECTORIAL_AUTOFIT_DEBUG} +{.$define FPVECTORIAL_SUPPORT_LAZARUS_1_6} // visual debugs {.$define FPVECTORIAL_TOCANVAS_ELLIPSE_VISUALDEBUG} {.$define FPVECTORIAL_RENDERINFO_VISUALDEBUG} @@ -4180,6 +4181,7 @@ end; procedure TvEntityWithPenAndBrush.DrawNativePolygonBrushRadialGradient( ADest: TFPCustomCanvas; var ARenderInfo: TvRenderInfo; const APoints: TPointsArray; ARect: TRect); +{$ifndef FPVECTORIAL_SUPPORT_LAZARUS_1_6} {$ifdef USE_LCL_CANVAS} var lLogRadGrad: TLogRadialGradient; @@ -4199,8 +4201,10 @@ var end; end; +{$endif} {$endif} begin + {$ifndef FPVECTORIAL_SUPPORT_LAZARUS_1_6} {$ifdef USE_LCL_CANVAS} lLogRadGrad.radCenterX := Gradient_value_to_px(Brush.Gradient_cx, Brush.Gradient_cx_Unit, False); lLogRadGrad.radCenterY := Gradient_value_to_px(Brush.Gradient_cy, Brush.Gradient_cy_Unit, False); @@ -4224,6 +4228,7 @@ begin TCanvas(ADest).Polygon(APoints); TCanvas(ADest).Brush.Handle := lOldBrush; {$endif} + {$endif} end; procedure TvEntityWithPenAndBrush.DrawBrushGradient(ADest: TFPCustomCanvas;