Changeset 494 for GraphicTest/Packages/bgrabitmap/bgravectorize.pas
- Timestamp:
- Dec 22, 2016, 8:49:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/bgrabitmap/bgravectorize.pas
r472 r494 190 190 implementation 191 191 192 uses LCLProc, FileUtil, lazutf8classes; 193 194 {$i winstream.inc} 192 uses BGRAUTF8; 193 195 194 function VectorizeMonochrome(ASource: TBGRACustomBitmap; zoom: single; PixelCenteredCoordinates: boolean): ArrayOfTPointF; 196 195 const unitShift = 6; … … 1285 1284 if not FFontPixelMetricComputed and (FFont <> nil) then 1286 1285 begin 1287 FFontPixelMetric := BGRAText.Get FontPixelMetric(FFont);1286 FFontPixelMetric := BGRAText.GetLCLFontPixelMetric(FFont); 1288 1287 FFontPixelMetricComputed := true; 1289 1288 end; … … 1916 1915 end; 1917 1916 until FindNext(SearchRec) <> 0; 1917 FindClose(SearchRec); 1918 1918 SetLength(FDirectoryContent,NbFiles); 1919 1919 end; … … 2010 2010 begin 2011 2011 inherited WriteCustomHeader(AStream); 2012 WinWriteLongint(AStream, length(FName));2012 LEWriteLongint(AStream, length(FName)); 2013 2013 AStream.Write(FName[1],length(FName)); 2014 WinWriteLongint(AStream, integer(FStyle));2015 WinWriteSingle(AStream, FontEmHeightRatio);2016 WinWriteLongint(AStream, Resolution);2014 LEWriteLongint(AStream, integer(FStyle)); 2015 LEWriteSingle(AStream, FontEmHeightRatio); 2016 LEWriteLongint(AStream, Resolution); 2017 2017 metric := FontPixelMetric; 2018 WinWriteLongint(AStream, metric.Baseline);2019 WinWriteLongint(AStream, metric.xLine);2020 WinWriteLongint(AStream, metric.CapLine);2021 WinWriteLongint(AStream, metric.DescentLine);2022 WinWriteLongint(AStream, metric.Lineheight);2018 LEWriteLongint(AStream, metric.Baseline); 2019 LEWriteLongint(AStream, metric.xLine); 2020 LEWriteLongint(AStream, metric.CapLine); 2021 LEWriteLongint(AStream, metric.DescentLine); 2022 LEWriteLongint(AStream, metric.Lineheight); 2023 2023 end; 2024 2024 … … 2048 2048 var lNameLength: integer; 2049 2049 begin 2050 lNameLength := WinReadLongint(AStream);2050 lNameLength := LEReadLongint(AStream); 2051 2051 setlength(result.Name, lNameLength); 2052 2052 AStream.Read(result.Name[1],length(result.Name)); 2053 result.Style := TFontStyles( WinReadLongint(AStream));2054 result.EmHeightRatio:= WinReadSingle(AStream);2055 result.Resolution := WinReadLongint(AStream);2056 result.PixelMetric.Baseline := WinReadLongint(AStream);2057 result.PixelMetric.xLine := WinReadLongint(AStream);2058 result.PixelMetric.CapLine := WinReadLongint(AStream);2059 result.PixelMetric.DescentLine := WinReadLongint(AStream);2060 result.PixelMetric.Lineheight := WinReadLongint(AStream);2053 result.Style := TFontStyles(LEReadLongint(AStream)); 2054 result.EmHeightRatio:= LEReadSingle(AStream); 2055 result.Resolution := LEReadLongint(AStream); 2056 result.PixelMetric.Baseline := LEReadLongint(AStream); 2057 result.PixelMetric.xLine := LEReadLongint(AStream); 2058 result.PixelMetric.CapLine := LEReadLongint(AStream); 2059 result.PixelMetric.DescentLine := LEReadLongint(AStream); 2060 result.PixelMetric.Lineheight := LEReadLongint(AStream); 2061 2061 result.PixelMetric.Defined := result.PixelMetric.Lineheight > 0; 2062 2062 end;
Note:
See TracChangeset
for help on using the changeset viewer.