Hi again.
I been debugging the code of fpvectorial for understand how it works and I think I found a tiny improvement.
If you are using milimiters in your svg file, the parser work fine, but if you don't, may be you can get random values for width and height.
Is a minor change for function "StringWithUnitToFloat" of svgvectorialreader.
function TvSVGVectorialReader.StringWithUnitToFloat(AStr: string): Single;
var
UnitStr, ValueStr: string;
Len: Integer;
begin
// Check the unit
Len := Length(AStr);
UnitStr := Copy(AStr, Len-1, 2);
if UnitStr = 'mm' then
begin
ValueStr := Copy(AStr, 1, Len-2);
Result := StrToInt(ValueStr);
end
else
Result := StrToInt(AStr);
end;
I hope this can help.
Regards,
pfergiu