Skip to content

for correct load SVG from stream need adden to public TSVGGraphic in SVGIconImage.pas #53

@alex21mir

Description

@alex21mir

class function TSVGGraphic.CanLoadFromStream(Stream: TStream): Boolean;
var
Header: Array[0..4] of AnsiChar;
P: Int64;
TstHdr:ansistring;
begin
P := Stream.Position;
TstHdr:='<?xml';
try
Result := (Stream.Read(Header[0], SizeOf(Header)) = SizeOf(Header)) and
CompareMem(@Header[0], @TstHdr[1], SizeOf(Header));
finally
Stream.Position := P;
end;
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions