mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 23:59:24 +02:00
fpvectorial: DXF: Adds support for the color of an arrow
git-svn-id: trunk@37236 -
This commit is contained in:
parent
43b9f71606
commit
fc747d6013
@ -1445,9 +1445,11 @@ var
|
|||||||
i, curPoint: Integer;
|
i, curPoint: Integer;
|
||||||
lValueX, lValueY: Double;
|
lValueX, lValueY: Double;
|
||||||
lArrow: TvArrow;
|
lArrow: TvArrow;
|
||||||
|
LElementColor: TFPColor;
|
||||||
begin
|
begin
|
||||||
lArrow := TvArrow.Create;
|
lArrow := TvArrow.Create;
|
||||||
curPoint := 0;
|
curPoint := 0;
|
||||||
|
LElementColor := colBlack;
|
||||||
|
|
||||||
for i := 0 to ATokens.Count - 1 do
|
for i := 0 to ATokens.Count - 1 do
|
||||||
begin
|
begin
|
||||||
@ -1455,7 +1457,7 @@ begin
|
|||||||
CurToken := TDXFToken(ATokens.Items[i]);
|
CurToken := TDXFToken(ATokens.Items[i]);
|
||||||
|
|
||||||
// Avoid an exception by previously checking if the conversion can be made
|
// Avoid an exception by previously checking if the conversion can be made
|
||||||
if CurToken.GroupCode in [10, 20, 30, 11, 21, 31] then
|
if CurToken.GroupCode in [10, 20, 30, 11, 21, 31, 62] then
|
||||||
begin
|
begin
|
||||||
CurToken.FloatValue := StrToFloat(Trim(CurToken.StrValue), FPointSeparator);
|
CurToken.FloatValue := StrToFloat(Trim(CurToken.StrValue), FPointSeparator);
|
||||||
end;
|
end;
|
||||||
@ -1486,6 +1488,7 @@ begin
|
|||||||
3: lArrow.ExtraLineBase.Y := lValueY;
|
3: lArrow.ExtraLineBase.Y := lValueY;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
62: LElementColor := DXFColorIndexToFPColor(Trunc(CurToken.FloatValue));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1495,7 +1498,9 @@ begin
|
|||||||
|
|
||||||
// And now write it
|
// And now write it
|
||||||
lArrow.HasExtraLine := True;
|
lArrow.HasExtraLine := True;
|
||||||
|
lArrow.Pen.Color := LElementColor;
|
||||||
lArrow.Brush.Style := bsSolid;
|
lArrow.Brush.Style := bsSolid;
|
||||||
|
lArrow.Brush.Color := LElementColor;
|
||||||
AData.AddEntity(lArrow);
|
AData.AddEntity(lArrow);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user