|
@@ -117,6 +117,7 @@ type
|
|
procedure Assign(Obj: TObject);
|
|
procedure Assign(Obj: TObject);
|
|
procedure AssignExceptGeometry(Obj: TObject);
|
|
procedure AssignExceptGeometry(Obj: TObject);
|
|
procedure FitGeometry(const ABox: TAffineBox);
|
|
procedure FitGeometry(const ABox: TAffineBox);
|
|
|
|
+ procedure ApplyOpacity(AOpacity: Byte);
|
|
property FillType: TVectorialFillType read GetFillType;
|
|
property FillType: TVectorialFillType read GetFillType;
|
|
property IsEditable: boolean read GetIsEditable;
|
|
property IsEditable: boolean read GetIsEditable;
|
|
property Gradient: TBGRALayerGradientOriginal read FGradient;
|
|
property Gradient: TBGRALayerGradientOriginal read FGradient;
|
|
@@ -132,7 +133,7 @@ type
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
-uses BGRAGradientScanner;
|
|
|
|
|
|
+uses BGRAGradientScanner, BGRABlend;
|
|
|
|
|
|
{ TVectorialFillDiff }
|
|
{ TVectorialFillDiff }
|
|
|
|
|
|
@@ -720,5 +721,20 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TVectorialFill.ApplyOpacity(AOpacity: byte);
|
|
|
|
+var
|
|
|
|
+ c: TBGRAPixel;
|
|
|
|
+begin
|
|
|
|
+ case FillType of
|
|
|
|
+ vftSolid: begin
|
|
|
|
+ c := SolidColor;
|
|
|
|
+ c.alpha := BGRABlend.ApplyOpacity(c.alpha, AOpacity);
|
|
|
|
+ SolidColor := c;
|
|
|
|
+ end;
|
|
|
|
+ vftGradient: Gradient.ApplyOpacity(AOpacity);
|
|
|
|
+ vftTexture: TextureOpacity := BGRABlend.ApplyOpacity(TextureOpacity, AOpacity);
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
end.
|
|
end.
|
|
|
|
|