فهرست منبع

load SVG file

Unknown 6 سال پیش
والد
کامیت
b758d231c5
2فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 1 0
      lazpaint/ubrowseimages.pas
  2. 3 1
      lazpaint/ufileextensions.pas

+ 1 - 0
lazpaint/ubrowseimages.pas

@@ -475,6 +475,7 @@ begin
     else if format = ifGIF then AType := 'GIF' //do not know if animated or not
     else if format = ifIco then AType := 'Icon'
     else if format = ifCur then AType := 'Cursor'
+    else if format = ifSvg then AType := 'SVG'  //too long to write explicitely
     else AType := GetImageFormatName(format);
   end;
 end;

+ 3 - 1
lazpaint/ufileextensions.pas

@@ -39,7 +39,7 @@ function GetImageFormatName(AFormat: TBGRAImageFormat): string;
 
 implementation
 
-uses Masks, LazUTF8, UResourceStrings;
+uses Masks, LazUTF8, UResourceStrings, BGRASVG;
 
 function GetSelectedFilterExtensions(const Filter: string;
   FilterIndex: integer; ARemoveLeadingDot: boolean): TStringList;
@@ -313,6 +313,8 @@ initialization
   RegisterPicExt('PhoXo','oXo', [eoReadable,eoWritable]);
   RegisterPicExt('Portable Network Graphic','png', [eoReadable,eoWritable]);
   RegisterPicExt(rsPhotoshop,'psd', [eoReadable]);
+  BGRASVG.RegisterSvgFormat;
+  RegisterPicExt('Scalable Vector Graphic','svg', [eoReadable]);
   RegisterPicExt('Targa','tga', [eoReadable,eoWritable]);
   RegisterPicExt('Tiff','tif;tiff', [eoReadable,eoWritable]);
   RegisterPicExt('X PixMap','xpm', [eoReadable,eoWritable]);