|
@@ -67,6 +67,7 @@ type
|
|
ToolBarOutlineFill: TToolBar;
|
|
ToolBarOutlineFill: TToolBar;
|
|
ToolBarPenFill: TToolBar;
|
|
ToolBarPenFill: TToolBar;
|
|
ToolButtonTextShape: TToolButton;
|
|
ToolButtonTextShape: TToolButton;
|
|
|
|
+ UpDownOutlineWidth: TBCTrackbarUpdown;
|
|
VectorImageList24: TBGRAImageList;
|
|
VectorImageList24: TBGRAImageList;
|
|
ActionList: TActionList;
|
|
ActionList: TActionList;
|
|
EditCopy: TAction;
|
|
EditCopy: TAction;
|
|
@@ -147,6 +148,7 @@ type
|
|
procedure ShapeMoveUpExecute(Sender: TObject);
|
|
procedure ShapeMoveUpExecute(Sender: TObject);
|
|
procedure ShapeSendToBackExecute(Sender: TObject);
|
|
procedure ShapeSendToBackExecute(Sender: TObject);
|
|
procedure ToolButtonJoinClick(Sender: TObject);
|
|
procedure ToolButtonJoinClick(Sender: TObject);
|
|
|
|
+ procedure UpDownOutlineWidthChange(Sender: TObject; AByUser: boolean);
|
|
procedure UpDownPenWidthChange(Sender: TObject; AByUser: boolean);
|
|
procedure UpDownPenWidthChange(Sender: TObject; AByUser: boolean);
|
|
procedure BGRAVirtualScreen1MouseDown(Sender: TObject;
|
|
procedure BGRAVirtualScreen1MouseDown(Sender: TObject;
|
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
|
@@ -171,6 +173,8 @@ type
|
|
FPenStyle: TBGRAPenStyle;
|
|
FPenStyle: TBGRAPenStyle;
|
|
FPenJoinStyle: TPenJoinStyle;
|
|
FPenJoinStyle: TPenJoinStyle;
|
|
FPenStyleMenu: TPopupMenu;
|
|
FPenStyleMenu: TPopupMenu;
|
|
|
|
+ FOutlineWidth: Single;
|
|
|
|
+
|
|
FFlattened: TBGRABitmap;
|
|
FFlattened: TBGRABitmap;
|
|
FLastEditorBounds: TRect;
|
|
FLastEditorBounds: TRect;
|
|
FUpdatingFromShape: boolean;
|
|
FUpdatingFromShape: boolean;
|
|
@@ -202,6 +206,7 @@ type
|
|
FFullIconHeight: integer;
|
|
FFullIconHeight: integer;
|
|
FVectorImageList: TBGRAImageList;
|
|
FVectorImageList: TBGRAImageList;
|
|
procedure ComboBoxSplineStyleClick(Sender: TObject);
|
|
procedure ComboBoxSplineStyleClick(Sender: TObject);
|
|
|
|
+ function GetOutlineWidth: single;
|
|
function GetPenStyle: TBGRAPenStyle;
|
|
function GetPenStyle: TBGRAPenStyle;
|
|
function GetPenWidth: single;
|
|
function GetPenWidth: single;
|
|
function GetSplineStyle: TSplineStyle;
|
|
function GetSplineStyle: TSplineStyle;
|
|
@@ -222,6 +227,7 @@ type
|
|
procedure RequestOutlineFillUpdate(Sender: TObject);
|
|
procedure RequestOutlineFillUpdate(Sender: TObject);
|
|
procedure OnBackFillChange({%H-}ASender: TObject);
|
|
procedure OnBackFillChange({%H-}ASender: TObject);
|
|
procedure SetCurrentTool(AValue: TPaintTool);
|
|
procedure SetCurrentTool(AValue: TPaintTool);
|
|
|
|
+ procedure SetOutlineWidth(AValue: single);
|
|
procedure SetPenJoinStyle(AValue: TPenJoinStyle);
|
|
procedure SetPenJoinStyle(AValue: TPenJoinStyle);
|
|
procedure SetPenStyle(AValue: TBGRAPenStyle);
|
|
procedure SetPenStyle(AValue: TBGRAPenStyle);
|
|
procedure SetPenWidth(AValue: single);
|
|
procedure SetPenWidth(AValue: single);
|
|
@@ -289,6 +295,7 @@ type
|
|
property vectorTransform: TAffineMatrix read GetVectorTransform;
|
|
property vectorTransform: TAffineMatrix read GetVectorTransform;
|
|
property penWidth: single read GetPenWidth write SetPenWidth;
|
|
property penWidth: single read GetPenWidth write SetPenWidth;
|
|
property penStyle: TBGRAPenStyle read GetPenStyle write SetPenStyle;
|
|
property penStyle: TBGRAPenStyle read GetPenStyle write SetPenStyle;
|
|
|
|
+ property outlineWidth: single read GetOutlineWidth write SetOutlineWidth;
|
|
property splineStyle: TSplineStyle read GetSplineStyle write SetSplineStyle;
|
|
property splineStyle: TSplineStyle read GetSplineStyle write SetSplineStyle;
|
|
property currentTool: TPaintTool read FCurrentTool write SetCurrentTool;
|
|
property currentTool: TPaintTool read FCurrentTool write SetCurrentTool;
|
|
property joinStyle: TPenJoinStyle read FPenJoinStyle write SetPenJoinStyle;
|
|
property joinStyle: TPenJoinStyle read FPenJoinStyle write SetPenJoinStyle;
|
|
@@ -439,6 +446,7 @@ begin
|
|
newShape:= nil;
|
|
newShape:= nil;
|
|
penWidth := 5;
|
|
penWidth := 5;
|
|
penStyle := SolidPenStyle;
|
|
penStyle := SolidPenStyle;
|
|
|
|
+ outlineWidth := DefaultShapeOutlineWidth;
|
|
joinStyle:= pjsBevel;
|
|
joinStyle:= pjsBevel;
|
|
currentTool:= ptHand;
|
|
currentTool:= ptHand;
|
|
splineStyle:= ssEasyBezier;
|
|
splineStyle:= ssEasyBezier;
|
|
@@ -554,6 +562,12 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TForm1.UpDownOutlineWidthChange(Sender: TObject; AByUser: boolean);
|
|
|
|
+begin
|
|
|
|
+ if not AByUser then exit;
|
|
|
|
+ outlineWidth := UpDownOutlineWidth.Value/10;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TForm1.EditCopyExecute(Sender: TObject);
|
|
procedure TForm1.EditCopyExecute(Sender: TObject);
|
|
begin
|
|
begin
|
|
DoCopy;
|
|
DoCopy;
|
|
@@ -1005,6 +1019,11 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function TForm1.GetOutlineWidth: single;
|
|
|
|
+begin
|
|
|
|
+ result := FOutlineWidth;
|
|
|
|
+end;
|
|
|
|
+
|
|
function TForm1.GetPenStyle: TBGRAPenStyle;
|
|
function TForm1.GetPenStyle: TBGRAPenStyle;
|
|
begin
|
|
begin
|
|
result := FPenStyle;
|
|
result := FPenStyle;
|
|
@@ -1209,6 +1228,14 @@ begin
|
|
UpdateShapeUserMode;
|
|
UpdateShapeUserMode;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TForm1.SetOutlineWidth(AValue: single);
|
|
|
|
+begin
|
|
|
|
+ FOutlineWidth := AValue;
|
|
|
|
+ UpDownOutlineWidth.Value := round(AValue*10);
|
|
|
|
+ if not FUpdatingFromShape and Assigned(vectorOriginal) and Assigned(vectorOriginal.SelectedShape) then
|
|
|
|
+ vectorOriginal.SelectedShape.OutlineWidth:= FOutlineWidth;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TForm1.SetPenJoinStyle(AValue: TPenJoinStyle);
|
|
procedure TForm1.SetPenJoinStyle(AValue: TPenJoinStyle);
|
|
begin
|
|
begin
|
|
if FPenJoinStyle=AValue then Exit;
|
|
if FPenJoinStyle=AValue then Exit;
|
|
@@ -1557,7 +1584,11 @@ begin
|
|
if vsfJoinStyle in f then joinStyle:= AShape.JoinStyle;
|
|
if vsfJoinStyle in f then joinStyle:= AShape.JoinStyle;
|
|
|
|
|
|
if vsfBackFill in f then BackFillControl.AssignFill(AShape.BackFill);
|
|
if vsfBackFill in f then BackFillControl.AssignFill(AShape.BackFill);
|
|
- if vsfOutlineFill in f then OutlineFillControl.AssignFill(AShape.OutlineFill);
|
|
|
|
|
|
+ if vsfOutlineFill in f then
|
|
|
|
+ begin
|
|
|
|
+ OutlineFillControl.AssignFill(AShape.OutlineFill);
|
|
|
|
+ outlineWidth := AShape.OutlineWidth;
|
|
|
|
+ end;
|
|
|
|
|
|
if AShape is TCurveShape then
|
|
if AShape is TCurveShape then
|
|
splineStyle:= TCurveShape(AShape).SplineStyle;
|
|
splineStyle:= TCurveShape(AShape).SplineStyle;
|
|
@@ -1794,6 +1825,7 @@ begin
|
|
vectorFill := OutlineFillControl.CreateShapeFill(result);
|
|
vectorFill := OutlineFillControl.CreateShapeFill(result);
|
|
result.OutlineFill := vectorFill;
|
|
result.OutlineFill := vectorFill;
|
|
vectorFill.Free;
|
|
vectorFill.Free;
|
|
|
|
+ result.OutlineWidth:= outlineWidth;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|