Ignore:
Timestamp:
Dec 22, 2016, 8:49:19 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Updated BGRABitmap package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Packages/bgrabitmap/bgravectorize.pas

    r472 r494  
    190190implementation
    191191
    192 uses LCLProc, FileUtil, lazutf8classes;
    193 
    194 {$i winstream.inc}
     192uses BGRAUTF8;
     193
    195194function VectorizeMonochrome(ASource: TBGRACustomBitmap; zoom: single; PixelCenteredCoordinates: boolean): ArrayOfTPointF;
    196195const unitShift = 6;
     
    12851284  if not FFontPixelMetricComputed and (FFont <> nil) then
    12861285  begin
    1287     FFontPixelMetric := BGRAText.GetFontPixelMetric(FFont);
     1286    FFontPixelMetric := BGRAText.GetLCLFontPixelMetric(FFont);
    12881287    FFontPixelMetricComputed := true;
    12891288  end;
     
    19161915    end;
    19171916  until FindNext(SearchRec) <> 0;
     1917  FindClose(SearchRec);
    19181918  SetLength(FDirectoryContent,NbFiles);
    19191919end;
     
    20102010begin
    20112011  inherited WriteCustomHeader(AStream);
    2012   WinWriteLongint(AStream, length(FName));
     2012  LEWriteLongint(AStream, length(FName));
    20132013  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);
    20172017  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);
    20232023end;
    20242024
     
    20482048var lNameLength: integer;
    20492049begin
    2050   lNameLength := WinReadLongint(AStream);
     2050  lNameLength := LEReadLongint(AStream);
    20512051  setlength(result.Name, lNameLength);
    20522052  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);
    20612061  result.PixelMetric.Defined := result.PixelMetric.Lineheight > 0;
    20622062end;
Note: See TracChangeset for help on using the changeset viewer.