Browse Source

* Fixes in DoCopyProps. Fixes issue #40362

Michaël Van Canneyt 1 year ago
parent
commit
9ef5b8bce9

+ 1 - 0
packages/fcl-image/src/fpbrush.inc

@@ -30,6 +30,7 @@ begin
     begin
     self.Style := Style;
     self.Image := Image;
+    self.Pattern := Pattern;
     end;
   inherited DoCopyProps(From);
 end;

+ 8 - 7
packages/fcl-image/src/fpfont.inc

@@ -37,13 +37,14 @@ end;
 
 procedure TFPCustomFont.DoCopyProps (From:TFPCanvasHelper);
 begin
-  with from as TFPCustomFont do
-    begin
-    self.FName := FName;
-    self.FSize := FSize;
-    self.FFPColor := FFPColor;
-    self.FFlags := FFlags;
-    end;
+  if From is TFPCustomFont then
+   with from as TFPCustomFont do
+     begin
+     self.FName := FName;
+     self.FSize := FSize;
+     self.FOrientation := FOrientation
+     end;
+  Inherited;  
 end;
 
 function TFPCustomFont.CopyFont : TFPCustomFont;

+ 2 - 0
packages/fcl-image/src/fppen.inc

@@ -57,6 +57,8 @@ begin
     self.Width := Width;
     self.Mode := Mode;
     self.pattern := pattern;
+    self.EndCap := EndCap;
+    self.JoinStyle := JoinStyle;
     end;
   inherited;
 end;