mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 02:36:07 +02:00
fpvectorial: Fix incorrect exception that paths must begin with a MoveTo command.
git-svn-id: trunk@51109 -
This commit is contained in:
parent
bc906c5514
commit
933d42cfa1
@ -529,12 +529,12 @@ begin
|
|||||||
begin
|
begin
|
||||||
curSegment := TPathSegment(APath.Next);
|
curSegment := TPathSegment(APath.Next);
|
||||||
|
|
||||||
|
if (i = 0) and (curSegment.SegmentType <> stMoveTo) then
|
||||||
|
raise Exception.Create('Path must start with a "MoveTo" command');
|
||||||
|
|
||||||
case curSegment.SegmentType of
|
case curSegment.SegmentType of
|
||||||
stMoveTo:
|
stMoveTo:
|
||||||
begin
|
begin
|
||||||
if i <> 0 then
|
|
||||||
raise Exception.Create('Path must start with a "MoveTo" command');
|
|
||||||
|
|
||||||
// Store current length of points array as polygon start index
|
// Store current length of points array as polygon start index
|
||||||
if numPolygons >= Length(PolygonStartIndexes) then
|
if numPolygons >= Length(PolygonStartIndexes) then
|
||||||
SetLength(PolygonstartIndexes, Length(PolygonStartIndexes) + POINT_BUFFER);
|
SetLength(PolygonstartIndexes, Length(PolygonStartIndexes) + POINT_BUFFER);
|
||||||
|
@ -2403,7 +2403,7 @@ begin
|
|||||||
for i := 0 to ANode.Attributes.Length - 1 do
|
for i := 0 to ANode.Attributes.Length - 1 do
|
||||||
begin
|
begin
|
||||||
lNodeName := ANode.Attributes.Item[i].NodeName;
|
lNodeName := ANode.Attributes.Item[i].NodeName;
|
||||||
if lNodeName = 'points' then
|
if lNodeName = 'points' then
|
||||||
lPointsStr := ANode.Attributes.Item[i].NodeValue;
|
lPointsStr := ANode.Attributes.Item[i].NodeValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user