diff --git a/Examples/Simple/Agg2DDemo.dpr b/Examples/Simple/Agg2DDemo.dpr index 1f5af22..cfe20c6 100644 --- a/Examples/Simple/Agg2DDemo.dpr +++ b/Examples/Simple/Agg2DDemo.dpr @@ -11,8 +11,19 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} + AggBasics in '..\..\Source\AggBasics.pas', AggTransAffine in '..\..\Source\AggTransAffine.pas', @@ -21,7 +32,7 @@ uses {-$DEFINE ViewportOptionAnisotropic} {-$DEFINE FontCacheRaster} -{$DEFINE More} +{-$DEFINE More} {$DEFINE UseTextHints} {-$DEFINE BlackBackground} {-$DEFINE UseClipBox} @@ -57,28 +68,21 @@ type FGmText: AnsiString; public constructor Create(PixelFormat: TPixelFormat; FlipY: Boolean); - destructor Destroy; override; - - procedure OnDraw; override; - - procedure OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); - override; + destructor Destroy(); override; + procedure OnDraw(); override; + procedure OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); override; end; - { TAggApplication } constructor TAggApplication.Create(PixelFormat: TPixelFormat; FlipY: Boolean); begin inherited Create(PixelFormat, FlipY); - FGraphics := TAgg2D.Create; FTimer := TAgg2D.Create; - FAngle := 0; FGamma := 1.4; FImage := 6; - Str(FGamma: 0: 2, FGmText); FGmText := 'Gamma: ' + FGmText; end; @@ -87,33 +91,24 @@ destructor TAggApplication.Destroy; begin FGraphics.Free; FTimer.Free; - Finalize(FGmText); - inherited; end; procedure TAggApplication.OnDraw; var Bounds: TRectDouble; - Clr, C1, C2, C3: TAggColorRgba8; - Img: TAgg2DImage; - Parl: TAggParallelogram; Poly: array [0..11] of Double; - Tm : Double; Fps: Integer; - Timer, Rate: AnsiString; begin StartTimer; - FGraphics.Attach(RenderingBufferWindow.Buffer, - RenderingBufferWindow.Width, RenderingBufferWindow.Height, - RenderingBufferWindow.Stride); + FGraphics.Attach(RenderingBufferWindow.Buffer, RenderingBufferWindow.Width, RenderingBufferWindow.Height, RenderingBufferWindow.Stride); {$IFDEF BlackBackground} FGraphics.ClearAll(0, 0, 0); @@ -128,8 +123,7 @@ begin FGraphics.FlipText := not CFlipY; {$IFDEF UseClipBox} - FGraphics.ClipBox(50, 50, RenderingBufferWindow.Width - 50, - RenderingBufferWindow.Height - 50); + FGraphics.ClipBox(50, 50, RenderingBufferWindow.Width - 50, RenderingBufferWindow.Height - 50); {$ENDIF} // Transformations - Rotate around (300, 300) to 5 degree @@ -155,8 +149,7 @@ begin FGraphics.Font(PAnsiChar(GFontTimes), 14, False, False); FGraphics.SetFillColor(0, 0, 0); FGraphics.NoLine; - FGraphics.Text(100, 20, PAnsiChar('Regular Raster Text -- Fast, but can''t ' - + 'be rotated'));{ } + FGraphics.Text(100, 20, PAnsiChar('Regular Raster Text -- Fast, but can''t ' + 'be rotated'));{ } {$ENDIF} // Outlined Text @@ -374,8 +367,7 @@ begin 2 : // Transform the rectangular part of the image to the destination // rectangle - FGraphics.TransformImage(Img, 60, 60, Img.Width - 60, Img.Height - 60, - 450, 200, 595, 350); + FGraphics.TransformImage(Img, 60, 60, Img.Width - 60, Img.Height - 60, 450, 200, 595, 350); 3 : // Transform the whole image to the destination parallelogram begin @@ -399,8 +391,7 @@ begin Parl[4] := 575; Parl[5] := 350; - FGraphics.TransformImage(Img, 60, 60, Img.Width - 60, Img.Height - 60, - @Parl[0]); + FGraphics.TransformImage(Img, 60, 60, Img.Width - 60, Img.Height - 60, @Parl[0]); end; @@ -421,8 +412,7 @@ begin FGraphics.MoveTo(450, 200); FGraphics.CubicCurveTo(595, 220, 575, 350, 595, 350); FGraphics.LineTo(470, 340); - FGraphics.TransformImagePath(Img, 60, 60, Img.Width - 60, - Img.Height - 60, 450, 200, 595, 350); + FGraphics.TransformImagePath(Img, 60, 60, Img.Width - 60, Img.Height - 60, 450, 200, 595, 350); end; @@ -460,8 +450,7 @@ begin Parl[4] := 575; Parl[5] := 350; - FGraphics.TransformImagePath(Img, 60, 60, Img.Width - 60, - Img.Height - 60, @Parl[0]); + FGraphics.TransformImagePath(Img, 60, 60, Img.Width - 60, Img.Height - 60, @Parl[0]); end; end; @@ -550,8 +539,7 @@ begin // ---------- Tm := GetElapsedTime; - FTimer.Attach(RenderingBufferWindow.Buffer, RenderingBufferWindow.Width, - RenderingBufferWindow.Height, RenderingBufferWindow.Stride); + FTimer.Attach(RenderingBufferWindow.Buffer, RenderingBufferWindow.Width, RenderingBufferWindow.Height, RenderingBufferWindow.Stride); FTimer.AntiAliasGamma := 1.4; @@ -574,8 +562,7 @@ begin FTimer.Text(350, 8, Timer); end; -procedure TAggApplication.OnKey(X, Y: Integer; Key: Cardinal; - Flags: TMouseKeyboardFlags); +procedure TAggApplication.OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); begin if Key = Cardinal(kcF1) then DisplayMessage('"Quick and dirty prototype" of 2D drawing API for AGG.'#13#13 @@ -595,7 +582,7 @@ begin if FAngle < 0 then FAngle := 360 - CAngleStep; - ForceRedraw; + ForceRedraw(); end; if Key = Cardinal(kcUp) then @@ -605,7 +592,7 @@ begin if FAngle > 360 then FAngle := CAngleStep; - ForceRedraw; + ForceRedraw(); end; if Key = Cardinal(kcRight) then @@ -615,7 +602,7 @@ begin if FImage > 8 then FImage := 1; - ForceRedraw; + ForceRedraw(); end; if Key = Cardinal(kcLeft) then @@ -625,7 +612,7 @@ begin if FImage < 1 then FImage := 8; - ForceRedraw; + ForceRedraw(); end; if Key = Cardinal(kcPadPlus) then @@ -635,7 +622,7 @@ begin Str(FGamma: 0: 2, FGmText); FGmText := 'Gamma: ' + FGmText; - ForceRedraw; + ForceRedraw(); end; if Key = Cardinal(kcPadMinus) then @@ -645,13 +632,14 @@ begin Str(FGamma: 0: 2, FGmText); FGmText := 'Gamma: ' + FGmText; - ForceRedraw; + ForceRedraw(); end; end; var ImageName, P, N, X: ShortString; Text: AnsiString; + App: TAggApplication; begin if Agg2DUsesFreeType then @@ -661,9 +649,9 @@ begin GFontVerdana := 'verdana.ttf'; end; - with TAggApplication.Create(pfBgra32, CFlipY) do + App := TAggApplication.Create(pfBgra32, CFlipY); try - Caption := 'Agg2DDemo (F1-Help)'; + App.Caption := 'Agg2DDemo (F1-Help)'; ImageName := 'spheres2'; @@ -676,19 +664,20 @@ begin end; {$ENDIF} - if not LoadImage(0, ImageName) then + if not App.LoadImage(0, ImageName) then begin - Text := 'File not found: ' + ImageName + ImageExtension; + Text := 'File not found: ' + ImageName + App.ImageExtension; if ImageName = 'spheres2' then Text := Text + #13#13 + 'Download http://www.antigrain.com/' - + ImageName + ImageExtension + #13 + 'or copy it from another ' + - 'directory if available.'; - - DisplayMessage(Text); + + ImageName + App.ImageExtension + #13 + 'or copy it from another ' + + 'directory if available.'; + App.DisplayMessage(PChar(Text)); end - else if Init(600, 600, [wfResize]) then - Run; + else if App.Init(600, 600, [wfResize]) then + begin + App.Run; + end; finally - Free; + App.Free; end; end. diff --git a/Examples/Simple/Agg2DDemo.lpi b/Examples/Simple/Agg2DDemo.lpi index 2dfb95f..cfcc6b3 100644 --- a/Examples/Simple/Agg2DDemo.lpi +++ b/Examples/Simple/Agg2DDemo.lpi @@ -1,15 +1,16 @@ - + - + + + - <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +18,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -61,12 +58,14 @@ </Parsing> <CodeGeneration> <SmartLinkUnit Value="True"/> + <Optimizations> + <OptimizationLevel Value="0"/> + </Optimizations> </CodeGeneration> <Linking> <Debugging> <GenerateDebugInfo Value="False"/> <UseLineInfoUnit Value="False"/> - <StripSymbols Value="True"/> </Debugging> <LinkSmart Value="True"/> <Options> @@ -75,12 +74,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AlphaGradient.dpr b/Examples/Simple/AlphaGradient.dpr index 61b46f1..b7ba927 100644 --- a/Examples/Simple/AlphaGradient.dpr +++ b/Examples/Simple/AlphaGradient.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics, @@ -26,7 +37,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggArray in '..\..\Source\AggArray.pas', diff --git a/Examples/Simple/AlphaGradient.lpi b/Examples/Simple/AlphaGradient.lpi index bd4ee28..02cda88 100644 --- a/Examples/Simple/AlphaGradient.lpi +++ b/Examples/Simple/AlphaGradient.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AlphaGradient"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AlphaMask.dpr b/Examples/Simple/AlphaMask.dpr index 866459d..7a2c302 100644 --- a/Examples/Simple/AlphaMask.dpr +++ b/Examples/Simple/AlphaMask.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -25,7 +36,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/AlphaMask.lpi b/Examples/Simple/AlphaMask.lpi index 3431471..4acb745 100644 --- a/Examples/Simple/AlphaMask.lpi +++ b/Examples/Simple/AlphaMask.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AlphaMask"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AlphaMask2.dpr b/Examples/Simple/AlphaMask2.dpr index 38ca0b3..3436f26 100644 --- a/Examples/Simple/AlphaMask2.dpr +++ b/Examples/Simple/AlphaMask2.dpr @@ -21,7 +21,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggArray in '..\..\Source\AggArray.pas', @@ -36,7 +47,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggRasterizerOutlineAA in '..\..\Source\AggRasterizerOutlineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', diff --git a/Examples/Simple/AlphaMask2.lpi b/Examples/Simple/AlphaMask2.lpi index 7c7a2aa..5437639 100644 --- a/Examples/Simple/AlphaMask2.lpi +++ b/Examples/Simple/AlphaMask2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AlphaMask2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AlphaMask3.dpr b/Examples/Simple/AlphaMask3.dpr index 95c54d2..9215eb1 100644 --- a/Examples/Simple/AlphaMask3.dpr +++ b/Examples/Simple/AlphaMask3.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/AlphaMask3.lpi b/Examples/Simple/AlphaMask3.lpi index 7a59fe5..b3fe670 100644 --- a/Examples/Simple/AlphaMask3.lpi +++ b/Examples/Simple/AlphaMask3.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AlphaMask3"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AntiAliasDemo.dpr b/Examples/Simple/AntiAliasDemo.dpr index 27a29ed..af9ac2e 100644 --- a/Examples/Simple/AntiAliasDemo.dpr +++ b/Examples/Simple/AntiAliasDemo.dpr @@ -10,14 +10,25 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', AggColor in '..\..\Source\AggColor.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', - AggPixelFormatRgb in '..\..\Source\AggPixelFormatRgb.pas', + AggPixelFormatRgba in '..\..\Source\AggPixelFormatRgba.pas', AggControl in '..\..\Source\Controls\AggControl.pas', AggSliderControl in '..\..\Source\Controls\AggSliderControl.pas', @@ -28,7 +39,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggGammaFunctions in '..\..\Source\AggGammaFunctions.pas', @@ -161,13 +172,12 @@ var begin Y := ScanLine.Y; NumSpans := ScanLine.NumSpans; - Span := ScanLine.GetBegin; + Span := PAggSpanUnpacked8(ScanLine.GetBegin); repeat X := Span.X; Covers := Span.Covers; NumPixel := Span.Len; - repeat A := ShrInt32(Covers^ * FColor.Rgba8.A, 8); @@ -180,7 +190,6 @@ begin Inc(X); Dec(NumPixel); until NumPixel = 0; - Dec(NumSpans); until NumSpans = 0; end; @@ -202,8 +211,7 @@ begin FY[2] := 310; FSlider[0] := TAggControlSlider.Create(80, 10, 600 - 10, 19, not FlipY); - FSlider[1] := TAggControlSlider.Create(80, 10 + 20, 600 - 10, 19 + 20, - not FlipY); + FSlider[1] := TAggControlSlider.Create(80, 10 + 20, 600 - 10, 19 + 20, not FlipY); FSlider[0].SetRange(8.0, 100.0); FSlider[0].NumSteps := 23; @@ -222,7 +230,7 @@ begin FSlider[1].NoTransform; // Initialize structures - PixelFormatBgr24(FPixelformats, RenderingBufferWindow); + PixelFormatBgra32(FPixelformats, RenderingBufferWindow); end; destructor TAggApplication.Destroy; @@ -444,7 +452,7 @@ begin end; begin - with TAggApplication.Create(pfBgr24, CFlipY) do + with TAggApplication.Create(pfBgra32, CFlipY) do try Caption := 'AGG Example. Anti-Aliasing Demo (F1-Help)'; diff --git a/Examples/Simple/AntiAliasDemo.lpi b/Examples/Simple/AntiAliasDemo.lpi index b4a577f..6cfc0b1 100644 --- a/Examples/Simple/AntiAliasDemo.lpi +++ b/Examples/Simple/AntiAliasDemo.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AntiAliasDemo"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/AntiAliasTest.dpr b/Examples/Simple/AntiAliasTest.dpr index 98f877d..9b8bbbf 100644 --- a/Examples/Simple/AntiAliasTest.dpr +++ b/Examples/Simple/AntiAliasTest.dpr @@ -12,7 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', @@ -27,7 +38,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggQuadratureOscillator in '..\..\Source\AggQuadratureOscillator.pas', @@ -658,7 +669,7 @@ begin // Test results & Update Text := Format('Points=%.2fK/sec, Lines=%.2fK/sec, Triangles=%.2fK/sec', [20000 / T1, 2000 / T2, 2000 / T3]); - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); UpdateWindow; diff --git a/Examples/Simple/AntiAliasTest.lpi b/Examples/Simple/AntiAliasTest.lpi index 039576b..ccc6549 100644 --- a/Examples/Simple/AntiAliasTest.lpi +++ b/Examples/Simple/AntiAliasTest.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="AntiAliasTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/BSpline.dpr b/Examples/Simple/BSpline.dpr index e010afe..becc17d 100644 --- a/Examples/Simple/BSpline.dpr +++ b/Examples/Simple/BSpline.dpr @@ -6,9 +6,9 @@ program BSpline; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/BSpline.lpi b/Examples/Simple/BSpline.lpi index d54d3ba..4b98aba 100644 --- a/Examples/Simple/BSpline.lpi +++ b/Examples/Simple/BSpline.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="BSpline"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/BezierDiv.dpr b/Examples/Simple/BezierDiv.dpr index 6875e46..6ebeab3 100644 --- a/Examples/Simple/BezierDiv.dpr +++ b/Examples/Simple/BezierDiv.dpr @@ -12,7 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -30,7 +41,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggRendererOutlineAA in '..\..\Source\AggRendererOutlineAA.pas', AggRendererOutlineImage in '..\..\Source\AggRendererOutlineImage.pas', diff --git a/Examples/Simple/BezierDiv.lpi b/Examples/Simple/BezierDiv.lpi index faba994..0a28e51 100644 --- a/Examples/Simple/BezierDiv.lpi +++ b/Examples/Simple/BezierDiv.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="BezierDiv"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/BlendColor.dpr b/Examples/Simple/BlendColor.dpr index 91c3b7d..1d2cd98 100644 --- a/Examples/Simple/BlendColor.dpr +++ b/Examples/Simple/BlendColor.dpr @@ -58,7 +58,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually +{$IFDEF AGG_WINDOWS} +AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', +AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', +{$ENDIF} +{$IFDEF AGG_LINUX} +AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', +AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', +{$ENDIF} +{$IFDEF AGG_MACOSX} +AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', +AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', +{$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', {$IFNDEF AGG_PF8} diff --git a/Examples/Simple/BlendColor.lpi b/Examples/Simple/BlendColor.lpi index 6ed43a4..7b8ae84 100644 --- a/Examples/Simple/BlendColor.lpi +++ b/Examples/Simple/BlendColor.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="BlendColor"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Blur.dpr b/Examples/Simple/Blur.dpr index d4ece45..fe49e94 100644 --- a/Examples/Simple/Blur.dpr +++ b/Examples/Simple/Blur.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/Blur.lpi b/Examples/Simple/Blur.lpi index 021877c..9eed10a 100644 --- a/Examples/Simple/Blur.lpi +++ b/Examples/Simple/Blur.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Blur"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Circles.dpr b/Examples/Simple/Circles.dpr index 4794527..dd7d9ca 100644 --- a/Examples/Simple/Circles.dpr +++ b/Examples/Simple/Circles.dpr @@ -6,9 +6,9 @@ program Circles; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -24,7 +24,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', diff --git a/Examples/Simple/Circles.lpi b/Examples/Simple/Circles.lpi index 5826cd2..b2d8cca 100644 --- a/Examples/Simple/Circles.lpi +++ b/Examples/Simple/Circles.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Circles"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/CompileX11.dpr b/Examples/Simple/CompileX11.dpr index 4c5b385..fbd33b8 100644 --- a/Examples/Simple/CompileX11.dpr +++ b/Examples/Simple/CompileX11.dpr @@ -6,12 +6,17 @@ uses Math, SysUtils, CTypes, + {$IFNDEF FPC} + Libc, + {$ELSE} + baseunix, + unix, + {$ENDIF} X, Xlib, Xutil, Xatom, - Keysym, - Libc; + Keysym; begin Writeln('For compilation of AggPas on Linux X11 we need the following units:'); @@ -23,6 +28,10 @@ begin Writeln(' Xutil'); Writeln(' Xatom'); Writeln(' keysym'); + {$IFNDEF FPC} Writeln(' libc'); - + {$ELSE} + Writeln(' baseunix'); + Writeln(' unix'); + {$ENDIF} end. diff --git a/Examples/Simple/CompileX11.lpi b/Examples/Simple/CompileX11.lpi index f9461a2..dda7e6a 100644 --- a/Examples/Simple/CompileX11.lpi +++ b/Examples/Simple/CompileX11.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="CompileX11"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ComponentRendering.dpr b/Examples/Simple/ComponentRendering.dpr index f32baae..0678737 100644 --- a/Examples/Simple/ComponentRendering.dpr +++ b/Examples/Simple/ComponentRendering.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/ComponentRendering.lpi b/Examples/Simple/ComponentRendering.lpi index 41d71a4..270d076 100644 --- a/Examples/Simple/ComponentRendering.lpi +++ b/Examples/Simple/ComponentRendering.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ComponentRendering"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Compositing.dpr b/Examples/Simple/Compositing.dpr index c4b27e5..77a7609 100644 --- a/Examples/Simple/Compositing.dpr +++ b/Examples/Simple/Compositing.dpr @@ -12,8 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -30,7 +40,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggMath in '..\..\Source\AggMath.pas', @@ -551,7 +561,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(600, 400, [wfResize]) then Run; diff --git a/Examples/Simple/Compositing.lpi b/Examples/Simple/Compositing.lpi index 9b518c0..65d8d3b 100644 --- a/Examples/Simple/Compositing.lpi +++ b/Examples/Simple/Compositing.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Compositing"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Compositing2.dpr b/Examples/Simple/Compositing2.dpr index b85dd1a..7842d8c 100644 --- a/Examples/Simple/Compositing2.dpr +++ b/Examples/Simple/Compositing2.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', @@ -21,7 +32,7 @@ uses AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/Compositing2.lpi b/Examples/Simple/Compositing2.lpi index 809f5f2..1fc90f6 100644 --- a/Examples/Simple/Compositing2.lpi +++ b/Examples/Simple/Compositing2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Compositing2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ConvContour.dpr b/Examples/Simple/ConvContour.dpr index 4cbd59d..9e2a29f 100644 --- a/Examples/Simple/ConvContour.dpr +++ b/Examples/Simple/ConvContour.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/ConvContour.lpi b/Examples/Simple/ConvContour.lpi index 9422083..e54c64e 100644 --- a/Examples/Simple/ConvContour.lpi +++ b/Examples/Simple/ConvContour.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ConvContour"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ConvDashMarker.dpr b/Examples/Simple/ConvDashMarker.dpr index 2cd3b5a..49dbaf6 100644 --- a/Examples/Simple/ConvDashMarker.dpr +++ b/Examples/Simple/ConvDashMarker.dpr @@ -11,13 +11,24 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', - AggPixelFormatRgb in '..\..\Source\AggPixelFormatRgb.pas', + AggPixelFormatRgba in '..\..\Source\AggPixelFormatRgba.pas', AggControl in '..\..\Source\Controls\AggControl.pas', AggSliderControl in '..\..\Source\Controls\AggSliderControl.pas', @@ -28,7 +39,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', @@ -164,7 +175,7 @@ var Ah: TAggArrowHead; begin // Initialize structures - PixelFormatBgr24(Pixf, RenderingBufferWindow); + PixelFormatBgra32(Pixf, RenderingBufferWindow); RendererBase := TAggRendererBase.Create(Pixf, True); try @@ -416,7 +427,7 @@ begin end; begin - with TAggApplication.Create(pfBgr24, CFlipY) do + with TAggApplication.Create(pfBgra32, CFlipY) do try Caption := 'AGG Example. Line Join (F1-Help)'; diff --git a/Examples/Simple/ConvDashMarker.lpi b/Examples/Simple/ConvDashMarker.lpi index 9f46d4a..6dc013b 100644 --- a/Examples/Simple/ConvDashMarker.lpi +++ b/Examples/Simple/ConvDashMarker.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ConvDashMarker"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ConvStroke.dpr b/Examples/Simple/ConvStroke.dpr index e8755f3..5ebf951 100644 --- a/Examples/Simple/ConvStroke.dpr +++ b/Examples/Simple/ConvStroke.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -27,7 +38,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', diff --git a/Examples/Simple/ConvStroke.lpi b/Examples/Simple/ConvStroke.lpi index 668033f..f3d2def 100644 --- a/Examples/Simple/ConvStroke.lpi +++ b/Examples/Simple/ConvStroke.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ConvStroke"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Distortions.dpr b/Examples/Simple/Distortions.dpr index 8d00615..7b45f4b 100644 --- a/Examples/Simple/Distortions.dpr +++ b/Examples/Simple/Distortions.dpr @@ -15,8 +15,18 @@ uses SysUtils, Math, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', @@ -34,7 +44,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggArray in '..\..\Source\AggArray.pas', @@ -703,7 +713,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(RenderingBufferImage[0].Width + 300, RenderingBufferImage[0].Height + 40 + 20, [wfResize]) then diff --git a/Examples/Simple/Distortions.lpi b/Examples/Simple/Distortions.lpi index a612104..035ebd6 100644 --- a/Examples/Simple/Distortions.lpi +++ b/Examples/Simple/Distortions.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Distortions"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/FindCompilersLinux.dpr b/Examples/Simple/FindCompilersLinux.dpr index d527e8e..139e5e5 100644 --- a/Examples/Simple/FindCompilersLinux.dpr +++ b/Examples/Simple/FindCompilersLinux.dpr @@ -8,10 +8,17 @@ program FindCompilersLinux; // uses - SysUtils, + + {$IFNDEF FPC} + Libc, + {$ELSE} + baseunix, + unix, + {$ENDIF} AggBasics, - AggFileUtils, - Libc; + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + SysUtils; {$I AggCompiler.inc} {$- } @@ -22,7 +29,7 @@ type end; const - Cardinal(kcMax = 99; + CKeyMax = 99; CPoolMax = 65536; CMakeMax = 99; @@ -78,7 +85,7 @@ begin Fname := Fname + #0; - Libc.Chmod(PAnsiChar(@Fname[1]), S_IRWXU or S_IRWXG or S_IROTH or S_IWOTH); + FpChmod(PAnsiChar(@Fname[1]), S_IRWXU or S_IRWXG or S_IROTH or S_IWOTH); if GPoolSize = Wr then Result := True; @@ -93,7 +100,7 @@ begin begin Inc(GKeyLastX); - if Cmp_str(GKeyArray[GKeyLastX - 1].Key) = GKeyScanX then + if CompString(GKeyArray[GKeyLastX - 1].Key) = GKeyScanX then begin Val := GKeyArray[GKeyLastX - 1].Val; Result := True; @@ -106,7 +113,7 @@ end; function FirstKey(Key: ShortString; var Val: ShortString): Boolean; begin GKeyLastX := 0; - GKeyScanX := Cmp_str(Key); + GKeyScanX := CompString(Key); Result := NextKey(Val); end; @@ -121,7 +128,7 @@ var procedure Add_key; begin - if GKeyCount < Cardinal(kcMax then + if GKeyCount < CKeyMax then begin GKeyArray[GKeyCount].Key := Key; GKeyArray[GKeyCount].Val := Val; @@ -304,7 +311,7 @@ begin FirstKey('target', Target); - if Cmp_str(Target) = Cmp_str('linux') then + if CompString(Target) = CompString('linux') then if WriteCompileScript(name, Ext) then Writeln('OK') else @@ -329,7 +336,7 @@ var begin SpreadName(Found, File_path, File_name, File_ext); - if Cmp_str(File_ext) = Cmp_str('.dpr') then + if CompString(File_ext) = CompString('.dpr') then CreateCompileScript(File_name, File_ext); end; diff --git a/Examples/Simple/FindCompilersLinux.lpi b/Examples/Simple/FindCompilersLinux.lpi index f0e8ae2..13182c9 100644 --- a/Examples/Simple/FindCompilersLinux.lpi +++ b/Examples/Simple/FindCompilersLinux.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="FindCompilersLinux"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/FlashRasterizer.dpr b/Examples/Simple/FlashRasterizer.dpr index f5f8a6d..fd5126b 100644 --- a/Examples/Simple/FlashRasterizer.dpr +++ b/Examples/Simple/FlashRasterizer.dpr @@ -11,8 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggArray in '..\..\Source\AggArray.pas', @@ -26,7 +36,7 @@ uses AggConvCurve in '..\..\Source\AggConvCurve.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', AggGsvText in '..\..\Source\AggGsvText.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', @@ -859,7 +869,7 @@ begin Str := Str + #13#13 + 'Download http://www.antigrain.com/' + FileName + #13 + 'or copy it from another directory if available.'; - DisplayMessage(Str); + DisplayMessage(PAnsiChar(Str)); end else if Init(655, 520, [wfResize]) then begin diff --git a/Examples/Simple/FlashRasterizer.lpi b/Examples/Simple/FlashRasterizer.lpi index 8d6b20d..e3a462f 100644 --- a/Examples/Simple/FlashRasterizer.lpi +++ b/Examples/Simple/FlashRasterizer.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="FlashRasterizer"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/FlashRasterizer2.dpr b/Examples/Simple/FlashRasterizer2.dpr index 063331f..32a2608 100644 --- a/Examples/Simple/FlashRasterizer2.dpr +++ b/Examples/Simple/FlashRasterizer2.dpr @@ -11,8 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggArray in '..\..\Source\AggArray.pas', @@ -26,7 +36,7 @@ uses AggConvCurve in '..\..\Source\AggConvCurve.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', AggGsvText in '..\..\Source\AggGsvText.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerOutlineAA in '..\..\Source\AggRasterizerOutlineAA.pas', @@ -840,7 +850,7 @@ begin Str := Str + #13#13 + 'Download http://www.antigrain.com/' + FileName + #13 + 'or copy it from another directory if available.'; - DisplayMessage(Str); + DisplayMessage(PAnsiChar(Str)); end else if Init(655, 520, [wfResize]) then begin diff --git a/Examples/Simple/FlashRasterizer2.lpi b/Examples/Simple/FlashRasterizer2.lpi index fbad398..3118b0a 100644 --- a/Examples/Simple/FlashRasterizer2.lpi +++ b/Examples/Simple/FlashRasterizer2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="FlashRasterizer2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/FreetypeTest.dpr b/Examples/Simple/FreetypeTest.dpr index 6783dcd..234be22 100644 --- a/Examples/Simple/FreetypeTest.dpr +++ b/Examples/Simple/FreetypeTest.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -30,7 +41,7 @@ uses AggRendererPrimitives in '..\..\Source\AggRendererPrimitives.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', @@ -214,8 +225,7 @@ begin FSliderGamma := TAggControlSlider.Create(260, 70, 635, 78, not FlipY); FCheckBoxHinting := TAggControlCheckBox.Create(160, 65, 'Hinting', not FlipY); FCheckBoxKerning := TAggControlCheckBox.Create(160, 80, 'Kerning', not FlipY); - FCheckBoxPerformance := TAggControlCheckBox.Create(160, 95, - 'Test Performance', not FlipY); + FCheckBoxPerformance := TAggControlCheckBox.Create(160, 95, 'Test Performance', not FlipY); FFontEngine := TAggFontEngineFreetypeInt32.Create; FFontCacheManager := TAggFontCacheManager.Create(FFontEngine); @@ -336,7 +346,7 @@ begin FContour.Width := -FSliderWeight.Value * FSliderHeight.Value * 0.05; - if FFontEngine.LoadFont(@GFontName[1], 0, Gren) then + if FFontEngine.LoadFont(GFontName, 0, Gren) then begin FFontEngine.Hinting := FCheckBoxHinting.Status; FFontEngine.SetHeight(FSliderHeight.Value); @@ -618,9 +628,9 @@ begin T := GetElapsedTime; - DisplayMessage(Format('Glyphs=%u, Time=%.3fms, %.3f glyps/sec, %.3f ' + + DisplayMessage(PAnsiChar(Format('Glyphs=%u, Time=%.3fms, %.3f glyps/sec, %.3f ' + 'microsecond/glyph', [NumGlyphs, T, (NumGlyphs / T) * 1000, - (T / NumGlyphs) * 1000])); + (T / NumGlyphs) * 1000]))); FCheckBoxPerformance.Status := False; diff --git a/Examples/Simple/FreetypeTest.lpi b/Examples/Simple/FreetypeTest.lpi index 422b7d8..21c1b25 100644 --- a/Examples/Simple/FreetypeTest.lpi +++ b/Examples/Simple/FreetypeTest.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="FreetypeTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GammaControlDemo.dpr b/Examples/Simple/GammaControlDemo.dpr index a01c647..e09539c 100644 --- a/Examples/Simple/GammaControlDemo.dpr +++ b/Examples/Simple/GammaControlDemo.dpr @@ -7,9 +7,9 @@ program GammaControlDemo; {$I- } { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/GammaControlDemo.lpi b/Examples/Simple/GammaControlDemo.lpi index 17b7b1e..4f7e80e 100644 --- a/Examples/Simple/GammaControlDemo.lpi +++ b/Examples/Simple/GammaControlDemo.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GammaControlDemo"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GammaCorrection.dpr b/Examples/Simple/GammaCorrection.dpr index bfd614d..1f1194b 100644 --- a/Examples/Simple/GammaCorrection.dpr +++ b/Examples/Simple/GammaCorrection.dpr @@ -6,6 +6,7 @@ program GammaCorrection; {$I AggCompiler.inc} {$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGRA } { DEFINE AGG_Rgb24 } { DEFINE AGG_Rgb565 } { DEFINE AGG_Rgb555 } @@ -15,7 +16,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -24,7 +36,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', diff --git a/Examples/Simple/GammaCorrection.lpi b/Examples/Simple/GammaCorrection.lpi index fda8a96..2c98d84 100644 --- a/Examples/Simple/GammaCorrection.lpi +++ b/Examples/Simple/GammaCorrection.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GammaCorrection"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Gouraud.dpr b/Examples/Simple/Gouraud.dpr index 2e522ba..bf82bc1 100644 --- a/Examples/Simple/Gouraud.dpr +++ b/Examples/Simple/Gouraud.dpr @@ -6,9 +6,9 @@ program Gouraud; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -30,7 +41,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', @@ -368,7 +379,7 @@ begin T1 := GetElapsedTime; - DisplayMessage(Format('Time=%2.2f ms', [T1])); + DisplayMessage(PAnsiChar(Format('Time=%2.2f ms', [T1]))); finally ScanLine.Free; end; diff --git a/Examples/Simple/Gouraud.lpi b/Examples/Simple/Gouraud.lpi index fe203c0..59de8a6 100644 --- a/Examples/Simple/Gouraud.lpi +++ b/Examples/Simple/Gouraud.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Gouraud"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GouraudMesh.dpr b/Examples/Simple/GouraudMesh.dpr index c8a5a94..004c899 100644 --- a/Examples/Simple/GouraudMesh.dpr +++ b/Examples/Simple/GouraudMesh.dpr @@ -17,7 +17,18 @@ uses Classes, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', @@ -29,7 +40,7 @@ uses AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggConvTransform in '..\..\Source\AggConvTransform.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', diff --git a/Examples/Simple/GouraudMesh.lpi b/Examples/Simple/GouraudMesh.lpi index 03d3bd9..6cf1236 100644 --- a/Examples/Simple/GouraudMesh.lpi +++ b/Examples/Simple/GouraudMesh.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GouraudMesh"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GpcTest.dpr b/Examples/Simple/GpcTest.dpr index dc92858..4ddc72e 100644 --- a/Examples/Simple/GpcTest.dpr +++ b/Examples/Simple/GpcTest.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -31,7 +42,7 @@ uses AggRasterizerScanLine in '..\..\Source\AggRasterizerScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/GpcTest.lpi b/Examples/Simple/GpcTest.lpi index c17f5be..74e9e49 100644 --- a/Examples/Simple/GpcTest.lpi +++ b/Examples/Simple/GpcTest.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GpcTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,27 +17,27 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> - <Units Count="1"> + <Units Count="2"> <Unit0> <Filename Value="GpcTest.dpr"/> <IsPartOfProject Value="True"/> </Unit0> + <Unit1> + <Filename Value="..\..\Source\3rd Party\GPC\GPC.pas"/> + <IsPartOfProject Value="True"/> + </Unit1> </Units> </ProjectOptions> <CompilerOptions> @@ -48,7 +48,7 @@ </Target> <SearchPaths> <IncludeFiles Value="..\..\Source;$(ProjOutDir)"/> - <OtherUnitFiles Value="..\..\Source;..\..\Source\Controls;..\..\Source\Platform\Win"/> + <OtherUnitFiles Value="..\..\Source;..\..\Source\Controls;..\..\Source\Platform\Win;..\..\Source\3rd Party\GPC"/> <UnitOutputDirectory Value="..\..\UnitCache\$(TargetCPU)-$(TargetOS)"/> </SearchPaths> <Parsing> @@ -75,12 +75,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GradientFocal.dpr b/Examples/Simple/GradientFocal.dpr index 632c2c5..b713228 100644 --- a/Examples/Simple/GradientFocal.dpr +++ b/Examples/Simple/GradientFocal.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -25,7 +36,7 @@ uses AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggSpanAllocator in '..\..\Source\AggSpanAllocator.pas', diff --git a/Examples/Simple/GradientFocal.lpi b/Examples/Simple/GradientFocal.lpi index e8f1b5b..a55722e 100644 --- a/Examples/Simple/GradientFocal.lpi +++ b/Examples/Simple/GradientFocal.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GradientFocal"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Gradients.dpr b/Examples/Simple/Gradients.dpr index 42a0c43..a5d52be 100644 --- a/Examples/Simple/Gradients.dpr +++ b/Examples/Simple/Gradients.dpr @@ -25,7 +25,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -36,7 +47,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', diff --git a/Examples/Simple/Gradients.lpi b/Examples/Simple/Gradients.lpi index 19e3b0b..ccd4373 100644 --- a/Examples/Simple/Gradients.lpi +++ b/Examples/Simple/Gradients.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Gradients"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GradientsContour.dpr b/Examples/Simple/GradientsContour.dpr index 99b8a00..05ddc6e 100644 --- a/Examples/Simple/GradientsContour.dpr +++ b/Examples/Simple/GradientsContour.dpr @@ -12,7 +12,18 @@ uses SysUtils, Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggArray in '..\..\Source\AggArray.pas', @@ -33,7 +44,7 @@ uses AggRendererPrimitives in '..\..\Source\AggRendererPrimitives.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/GradientsContour.lpi b/Examples/Simple/GradientsContour.lpi index aa24945..f36c269 100644 --- a/Examples/Simple/GradientsContour.lpi +++ b/Examples/Simple/GradientsContour.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GradientsContour"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/GraphTest.dpr b/Examples/Simple/GraphTest.dpr index 8e2ef15..76287d9 100644 --- a/Examples/Simple/GraphTest.dpr +++ b/Examples/Simple/GraphTest.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -32,7 +43,7 @@ uses AggRasterizerOutline in '..\..\Source\AggRasterizerOutline.pas', AggScanLine in '..\..\Source\AggScanLine.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggArray in '..\..\Source\AggArray.pas', @@ -1473,7 +1484,7 @@ begin [Times[0], Times[1], Times[2], Times[3], Times[4]]); end; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); FCheckBoxBenchmark.Status := False; ForceRedraw; diff --git a/Examples/Simple/GraphTest.lpi b/Examples/Simple/GraphTest.lpi index c13d2a1..da1fa1c 100644 --- a/Examples/Simple/GraphTest.lpi +++ b/Examples/Simple/GraphTest.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="GraphTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Idea.dpr b/Examples/Simple/Idea.dpr index 2025951..19b31cb 100644 --- a/Examples/Simple/Idea.dpr +++ b/Examples/Simple/Idea.dpr @@ -6,9 +6,9 @@ program Idea; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/Idea.lpi b/Examples/Simple/Idea.lpi index ac20011..a0ea09c 100644 --- a/Examples/Simple/Idea.lpi +++ b/Examples/Simple/Idea.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Idea"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Image1.dpr b/Examples/Simple/Image1.dpr index 3190ab8..f145f72 100644 --- a/Examples/Simple/Image1.dpr +++ b/Examples/Simple/Image1.dpr @@ -12,8 +12,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -22,7 +32,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', @@ -267,7 +277,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(RenderingBufferImage[0].Width + 20, RenderingBufferImage[0].Height + 60, [wfResize]) then diff --git a/Examples/Simple/Image1.lpi b/Examples/Simple/Image1.lpi index 8d1dca7..71104a6 100644 --- a/Examples/Simple/Image1.lpi +++ b/Examples/Simple/Image1.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Image1"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageAlpha.dpr b/Examples/Simple/ImageAlpha.dpr index 0eb77c9..ec245ba 100644 --- a/Examples/Simple/ImageAlpha.dpr +++ b/Examples/Simple/ImageAlpha.dpr @@ -12,8 +12,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -29,7 +39,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggEllipse in '..\..\Source\AggEllipse.pas', @@ -315,7 +325,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(RenderingBufferImage[0].Width, RenderingBufferImage[0].Height, [wfResize]) then diff --git a/Examples/Simple/ImageAlpha.lpi b/Examples/Simple/ImageAlpha.lpi index 28b044c..0e7633e 100644 --- a/Examples/Simple/ImageAlpha.lpi +++ b/Examples/Simple/ImageAlpha.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageAlpha"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageFilterGraph.dpr b/Examples/Simple/ImageFilterGraph.dpr index d0fba44..e8ef40f 100644 --- a/Examples/Simple/ImageFilterGraph.dpr +++ b/Examples/Simple/ImageFilterGraph.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -29,7 +40,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/ImageFilterGraph.lpi b/Examples/Simple/ImageFilterGraph.lpi index 4020027..2fe72e9 100644 --- a/Examples/Simple/ImageFilterGraph.lpi +++ b/Examples/Simple/ImageFilterGraph.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageFilterGraph"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageFilters.dpr b/Examples/Simple/ImageFilters.dpr index d04be41..69301db 100644 --- a/Examples/Simple/ImageFilters.dpr +++ b/Examples/Simple/ImageFilters.dpr @@ -11,8 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -30,7 +40,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', @@ -573,7 +583,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else begin diff --git a/Examples/Simple/ImageFilters.lpi b/Examples/Simple/ImageFilters.lpi index dec3433..70359ce 100644 --- a/Examples/Simple/ImageFilters.lpi +++ b/Examples/Simple/ImageFilters.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageFilters"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageFilters2.dpr b/Examples/Simple/ImageFilters2.dpr index b53bb3d..af6004c 100644 --- a/Examples/Simple/ImageFilters2.dpr +++ b/Examples/Simple/ImageFilters2.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -29,7 +40,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/ImageFilters2.lpi b/Examples/Simple/ImageFilters2.lpi index 0e873ef..8e4077e 100644 --- a/Examples/Simple/ImageFilters2.lpi +++ b/Examples/Simple/ImageFilters2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageFilters2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImagePerspective.dpr b/Examples/Simple/ImagePerspective.dpr index fac304a..c7090eb 100644 --- a/Examples/Simple/ImagePerspective.dpr +++ b/Examples/Simple/ImagePerspective.dpr @@ -12,8 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -29,7 +39,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggPathStorage in '..\..\Source\AggPathStorage.pas', @@ -349,7 +359,7 @@ begin ForceRedraw; if mkfMouseRight in Flags then - DisplayMessage(Format('%d %d', [X, Y])); + DisplayMessage(PAnsiChar(Format('%d %d', [X, Y]))); end; procedure TAggApplication.OnMouseButtonUp(X, Y: Integer; @@ -407,7 +417,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(600, 600, [wfResize]) then Run; diff --git a/Examples/Simple/ImagePerspective.lpi b/Examples/Simple/ImagePerspective.lpi index 48c21a4..00b5857 100644 --- a/Examples/Simple/ImagePerspective.lpi +++ b/Examples/Simple/ImagePerspective.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImagePerspective"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageResample.dpr b/Examples/Simple/ImageResample.dpr index 07c83b8..a69cc36 100644 --- a/Examples/Simple/ImageResample.dpr +++ b/Examples/Simple/ImageResample.dpr @@ -12,8 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics, @@ -30,7 +40,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggPathStorage in '..\..\Source\AggPathStorage.pas', @@ -575,7 +585,7 @@ begin + GImgName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(600, 600, [wfResize]) then Run; diff --git a/Examples/Simple/ImageResample.lpi b/Examples/Simple/ImageResample.lpi index 17a8f59..9dbb376 100644 --- a/Examples/Simple/ImageResample.lpi +++ b/Examples/Simple/ImageResample.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageResample"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ImageTransforms.dpr b/Examples/Simple/ImageTransforms.dpr index 8da25ae..5c6f25a 100644 --- a/Examples/Simple/ImageTransforms.dpr +++ b/Examples/Simple/ImageTransforms.dpr @@ -12,8 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -31,7 +41,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggEllipse in '..\..\Source\AggEllipse.pas', @@ -560,7 +570,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(RenderingBufferImage[0].Width, RenderingBufferImage[0].Height, []) then diff --git a/Examples/Simple/ImageTransforms.lpi b/Examples/Simple/ImageTransforms.lpi index 15428d7..57a892e 100644 --- a/Examples/Simple/ImageTransforms.lpi +++ b/Examples/Simple/ImageTransforms.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ImageTransforms"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/LinePatterns.dpr b/Examples/Simple/LinePatterns.dpr index 67e97de..42df1b2 100644 --- a/Examples/Simple/LinePatterns.dpr +++ b/Examples/Simple/LinePatterns.dpr @@ -12,7 +12,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -443,10 +454,10 @@ begin begin Ext := ImageExtension; - DisplayMessage(Format('There must be files 1%s...9%s'#13 + + DisplayMessage(PAnsiChar(Format('There must be files 1%s...9%s'#13 + 'Download and unzip:'#13 + 'http://www.antigrain.com/line_patterns.bmp.zip'#13 + 'or'#13 + - 'http://www.antigrain.com/line_patterns.ppm.tar.gz'#13, [Ext, Ext])); + 'http://www.antigrain.com/line_patterns.ppm.tar.gz'#13, [Ext, Ext]))); end else if Init(500, 450, [wfResize]) then Run; diff --git a/Examples/Simple/LinePatterns.lpi b/Examples/Simple/LinePatterns.lpi index c23e007..744a0cb 100644 --- a/Examples/Simple/LinePatterns.lpi +++ b/Examples/Simple/LinePatterns.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="LinePatterns"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <RequiredPackages Count="1"> <Item1> @@ -80,12 +76,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Lion.dpr b/Examples/Simple/Lion.dpr index 12c6275..f3ce8f6 100644 --- a/Examples/Simple/Lion.dpr +++ b/Examples/Simple/Lion.dpr @@ -6,9 +6,9 @@ program Lion; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/Lion.lpi b/Examples/Simple/Lion.lpi index c78d1ce..8cb79ee 100644 --- a/Examples/Simple/Lion.lpi +++ b/Examples/Simple/Lion.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Lion"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/LionLens.dpr b/Examples/Simple/LionLens.dpr index dc58c94..0f177b4 100644 --- a/Examples/Simple/LionLens.dpr +++ b/Examples/Simple/LionLens.dpr @@ -6,9 +6,9 @@ program LionLens; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/LionLens.lpi b/Examples/Simple/LionLens.lpi index 6cfda0f..f010526 100644 --- a/Examples/Simple/LionLens.lpi +++ b/Examples/Simple/LionLens.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="LionLens"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/LionOutline.dpr b/Examples/Simple/LionOutline.dpr index 07bb69c..440fd04 100644 --- a/Examples/Simple/LionOutline.dpr +++ b/Examples/Simple/LionOutline.dpr @@ -6,9 +6,9 @@ program LionOutline; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/LionOutline.lpi b/Examples/Simple/LionOutline.lpi index f0c9404..711f330 100644 --- a/Examples/Simple/LionOutline.lpi +++ b/Examples/Simple/LionOutline.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="LionOutline"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/MultiClip.dpr b/Examples/Simple/MultiClip.dpr index 4bb074b..c3b75ec 100644 --- a/Examples/Simple/MultiClip.dpr +++ b/Examples/Simple/MultiClip.dpr @@ -6,9 +6,9 @@ program MultiClip; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -21,7 +21,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggArray in '..\..\Source\AggArray.pas', @@ -32,7 +43,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggRasterizerOutlineAA in '..\..\Source\AggRasterizerOutlineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', diff --git a/Examples/Simple/MultiClip.lpi b/Examples/Simple/MultiClip.lpi index 32d6315..31289f6 100644 --- a/Examples/Simple/MultiClip.lpi +++ b/Examples/Simple/MultiClip.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="MultiClip"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ParticleDemo.dpr b/Examples/Simple/ParticleDemo.dpr index 7519eb3..d0bc813 100644 --- a/Examples/Simple/ParticleDemo.dpr +++ b/Examples/Simple/ParticleDemo.dpr @@ -14,7 +14,18 @@ uses SysUtils, Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', @@ -32,7 +43,7 @@ uses AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', AggPixelFormatRgb in '..\..\Source\AggPixelFormatRgb.pas', diff --git a/Examples/Simple/ParticleDemo.lpi b/Examples/Simple/ParticleDemo.lpi index da7d77d..0ec4122 100644 --- a/Examples/Simple/ParticleDemo.lpi +++ b/Examples/Simple/ParticleDemo.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ParticleDemo"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/PatternFill.dpr b/Examples/Simple/PatternFill.dpr index 0b6888f..04b6c07 100644 --- a/Examples/Simple/PatternFill.dpr +++ b/Examples/Simple/PatternFill.dpr @@ -4,18 +4,29 @@ program PatternFill; // Note: Press F1 key on run to see more info about this demo {$I AggCompiler.inc} -{$DEFINE AGG_BGR24 } +{$DEFINE AGG_BGRA32 } uses {$IFDEF USE_FASTMM4} FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', - AggPixelFormatRgba in '..\..\Source\AggPixelFormatRgba.pas', + //AggPixelFormatRgba in '..\..\Source\AggPixelFormatRgba.pas', AggControl in '..\..\Source\Controls\AggControl.pas', AggRadioBoxControl in '..\..\Source\Controls\AggRadioBoxControl.pas', @@ -492,7 +503,7 @@ begin end; begin - with TAggApplication.Create(pfBgr24, CFlipY) do + with TAggApplication.Create(pfBgra32, CFlipY) do try Caption := 'AGG Example. Pattern Filling (F1-Help)'; diff --git a/Examples/Simple/PatternFill.lpi b/Examples/Simple/PatternFill.lpi index 8b5bfb6..c245a74 100644 --- a/Examples/Simple/PatternFill.lpi +++ b/Examples/Simple/PatternFill.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="PatternFill"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/PatternPerspective.dpr b/Examples/Simple/PatternPerspective.dpr index 8611598..1861a70 100644 --- a/Examples/Simple/PatternPerspective.dpr +++ b/Examples/Simple/PatternPerspective.dpr @@ -12,8 +12,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually - AggFileUtils, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -29,7 +39,7 @@ uses AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggPathStorage in '..\..\Source\AggPathStorage.pas', @@ -356,7 +366,7 @@ begin ForceRedraw; - DisplayMessage(Format('time=%.3f', [GetElapsedTime])); + DisplayMessage(PAnsiChar(Format('time=%.3f', [GetElapsedTime]))); end; end; @@ -371,7 +381,7 @@ procedure TAggApplication.OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); begin if Key = Cardinal(kcF1) then - DisplayMessage('Pattern perspective transformations. Essentially it''s the ' + DisplayMessage(PAnsiChar('Pattern perspective transformations. Essentially it''s the ' + 'same as Demo "image_perspective", but working with a repeating ' + 'pattern. Can be used for texturing.'#13#13 + 'How to play with:'#13#13 @@ -379,7 +389,7 @@ begin + 'Click the left mouse outside the pattern to run the performance ' + 'test.'#13#13 + 'Note: F2 key saves current "screenshot" file in this demo''s ' - + 'directory.'); + + 'directory.')); end; var @@ -410,7 +420,7 @@ begin + ImageName + ImageExtension + #13 + 'or copy it from another ' + 'directory if available.'; - DisplayMessage(Text); + DisplayMessage(PAnsiChar(Text)); end else if Init(600, 600, [wfResize]) then Run; diff --git a/Examples/Simple/PatternPerspective.lpi b/Examples/Simple/PatternPerspective.lpi index 8806e20..c0be805 100644 --- a/Examples/Simple/PatternPerspective.lpi +++ b/Examples/Simple/PatternPerspective.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="PatternPerspective"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Perspective.dpr b/Examples/Simple/Perspective.dpr index a1288bf..e53bb6e 100644 --- a/Examples/Simple/Perspective.dpr +++ b/Examples/Simple/Perspective.dpr @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/Perspective.lpi b/Examples/Simple/Perspective.lpi index c51c6d1..b8a8f2e 100644 --- a/Examples/Simple/Perspective.lpi +++ b/Examples/Simple/Perspective.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Perspective"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/PolymorphicRenderer.dpr b/Examples/Simple/PolymorphicRenderer.dpr index 5ab2503..b6fcb0e 100644 --- a/Examples/Simple/PolymorphicRenderer.dpr +++ b/Examples/Simple/PolymorphicRenderer.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -34,11 +45,11 @@ const // CPixelFormat = pfRgb555; // CPixelFormat = pfRgb565; // CPixelFormat = pfRgb24; - CPixelFormat = pfBgr24; +// CPixelFormat = pfBgr24; // CPixelFormat = pfRgba32; // CPixelFormat = pfArgb32; // CPixelFormat = pfAbgr32; -// CPixelFormat = pfBgra32; + CPixelFormat = pfBgra32; type TAggCustomPolymorphicRendererSolidRgba8Adaptor = class diff --git a/Examples/Simple/PolymorphicRenderer.lpi b/Examples/Simple/PolymorphicRenderer.lpi index f052778..0e33136 100644 --- a/Examples/Simple/PolymorphicRenderer.lpi +++ b/Examples/Simple/PolymorphicRenderer.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="PolymorphicRenderer"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/PureApiWin.dpr b/Examples/Simple/PureApiWin.dpr index 9f2bd82..a38a951 100644 --- a/Examples/Simple/PureApiWin.dpr +++ b/Examples/Simple/PureApiWin.dpr @@ -12,7 +12,18 @@ uses Windows, Messages, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', diff --git a/Examples/Simple/PureApiWin.lpi b/Examples/Simple/PureApiWin.lpi index 9499801..2e32866 100644 --- a/Examples/Simple/PureApiWin.lpi +++ b/Examples/Simple/PureApiWin.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="PureApiWin"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/RasterText.dpr b/Examples/Simple/RasterText.dpr index 2d90d2d..d95c9bd 100644 --- a/Examples/Simple/RasterText.dpr +++ b/Examples/Simple/RasterText.dpr @@ -10,19 +10,30 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', - AggPixelFormatRgb in '..\..\Source\AggPixelFormatRgb.pas', + AggPixelFormatRgba in '..\..\Source\AggPixelFormatRgba.pas', AggRenderingBuffer in '..\..\Source\AggRenderingBuffer.pas', AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggSpanAllocator in '..\..\Source\AggSpanAllocator.pas', @@ -162,7 +173,7 @@ begin // Initialize structures Glyph := TAggGlyphRasterBin.Create(nil); - PixelFormatBgr24(Pixf, RenderingBufferWindow); + PixelFormatBgra32(Pixf, RenderingBufferWindow); RendererBase := TAggRendererBase.Create(Pixf, True); try RendererBase.Clear(CRgba8White); @@ -254,7 +265,7 @@ begin end; begin - with TAggApplication.Create(pfBgr24, CFlipY) do + with TAggApplication.Create(pfBgra32, CFlipY) do try Caption := 'AGG Example. Raster Text (F1-Help)'; diff --git a/Examples/Simple/RasterText.lpi b/Examples/Simple/RasterText.lpi index 3ffe8c7..5f11c7b 100644 --- a/Examples/Simple/RasterText.lpi +++ b/Examples/Simple/RasterText.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="RasterText"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/RasterizerCompound.dpr b/Examples/Simple/RasterizerCompound.dpr index 80e746d..2a45e24 100644 --- a/Examples/Simple/RasterizerCompound.dpr +++ b/Examples/Simple/RasterizerCompound.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', @@ -28,7 +39,7 @@ uses AggRasterizerCompoundAA in '..\..\Source\AggRasterizerCompoundAA.pas', AggConvCurve in '..\..\Source\AggConvCurve.pas', AggConvStroke in '..\..\Source\AggConvStroke.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggSpanAllocator in '..\..\Source\AggSpanAllocator.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', diff --git a/Examples/Simple/RasterizerCompound.lpi b/Examples/Simple/RasterizerCompound.lpi index b747160..7687b00 100644 --- a/Examples/Simple/RasterizerCompound.lpi +++ b/Examples/Simple/RasterizerCompound.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="RasterizerCompound"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Rasterizers.dpr b/Examples/Simple/Rasterizers.dpr index edb3b15..e3ef16d 100644 --- a/Examples/Simple/Rasterizers.dpr +++ b/Examples/Simple/Rasterizers.dpr @@ -4,7 +4,7 @@ program Rasterizers; // Note: Press F1 key on run to see more info about this demo {$I AggCompiler.inc} -{$DEFINE AGG_BGR24} +{$DEFINE AGG_BGRA32} uses {$IFDEF USE_FASTMM4} @@ -12,7 +12,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', @@ -425,8 +436,8 @@ begin UpdateWindow; - DisplayMessage(Format('Time Aliased=%.2fms '#13 + - 'Time Anti-Aliased=%.2fms', [T1, T2])); + DisplayMessage(PAnsiChar(Format('Time Aliased=%.2fms '#13 + + 'Time Anti-Aliased=%.2fms', [T1, T2]))); end; end; diff --git a/Examples/Simple/Rasterizers.lpi b/Examples/Simple/Rasterizers.lpi index 04c1944..b93d4a7 100644 --- a/Examples/Simple/Rasterizers.lpi +++ b/Examples/Simple/Rasterizers.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Rasterizers"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/Rasterizers2.dpr b/Examples/Simple/Rasterizers2.dpr index 107d5f1..dcfd7b7 100644 --- a/Examples/Simple/Rasterizers2.dpr +++ b/Examples/Simple/Rasterizers2.dpr @@ -8,9 +8,9 @@ program Rasterizers2; {-$DEFINE AntiAliasedOutlineRenderer} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_Rgb24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RgbA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -24,7 +24,18 @@ uses Math, SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -713,9 +724,9 @@ begin FCheckBoxTest.Status := False; ForceRedraw; - DisplayMessage(Format('Aliased=%1.2fms, Anti-Aliased=%1.2fms, ' + DisplayMessage(PAnsiChar(Format('Aliased=%1.2fms, Anti-Aliased=%1.2fms, ' + 'ScanLine=%1.2fms, Image-Pattern=%1.2fms'#0, [T2, T3, T4, - T5])); + T5]))); // Free AGG resources diff --git a/Examples/Simple/Rasterizers2.lpi b/Examples/Simple/Rasterizers2.lpi index 2eaa05e..2a28977 100644 --- a/Examples/Simple/Rasterizers2.lpi +++ b/Examples/Simple/Rasterizers2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="Rasterizers2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/RoundedRect.dpr b/Examples/Simple/RoundedRect.dpr index 137f9b9..8658e22 100644 --- a/Examples/Simple/RoundedRect.dpr +++ b/Examples/Simple/RoundedRect.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} Math, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/RoundedRect.lpi b/Examples/Simple/RoundedRect.lpi index 98adbac..4fb3a22 100644 --- a/Examples/Simple/RoundedRect.lpi +++ b/Examples/Simple/RoundedRect.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="RoundedRect"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ScanlineBoolean.dpr b/Examples/Simple/ScanlineBoolean.dpr index e74ac9d..de588a5 100644 --- a/Examples/Simple/ScanlineBoolean.dpr +++ b/Examples/Simple/ScanlineBoolean.dpr @@ -6,9 +6,9 @@ program ScanLineBoolean; {$I AggCompiler.inc} { DEFINE AGG_GRAY8 } -{$DEFINE AGG_BGR24 } +{ DEFINE AGG_BGR24 } { DEFINE AGG_RGB24 } -{ DEFINE AGG_BGRA32 } +{$DEFINE AGG_BGRA32 } { DEFINE AGG_RGBA32 } { DEFINE AGG_ARGB32 } { DEFINE AGG_ABGR32 } @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -32,7 +43,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggScanLineBooleanAlgebra in '..\..\Source\AggScanLineBooleanAlgebra.pas', diff --git a/Examples/Simple/ScanlineBoolean.lpi b/Examples/Simple/ScanlineBoolean.lpi index 0779c9c..dbd0d26 100644 --- a/Examples/Simple/ScanlineBoolean.lpi +++ b/Examples/Simple/ScanlineBoolean.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ScanlineBoolean"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,26 +17,23 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> <Filename Value="ScanlineBoolean.dpr"/> <IsPartOfProject Value="True"/> + <UnitName Value="ScanLineBoolean"/> </Unit0> </Units> </ProjectOptions> @@ -75,12 +72,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/ScanlineBoolean2.dpr b/Examples/Simple/ScanlineBoolean2.dpr index d8776d1..0029f47 100644 --- a/Examples/Simple/ScanlineBoolean2.dpr +++ b/Examples/Simple/ScanlineBoolean2.dpr @@ -11,7 +11,18 @@ uses {$ENDIF} SysUtils, - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -31,7 +42,7 @@ uses AggRasterizerScanLine in '..\..\Source\AggRasterizerScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggScanLineStorageAA in '..\..\Source\AggScanLineStorageAA.pas', diff --git a/Examples/Simple/ScanlineBoolean2.lpi b/Examples/Simple/ScanlineBoolean2.lpi index d6fbe72..b4d8280 100644 --- a/Examples/Simple/ScanlineBoolean2.lpi +++ b/Examples/Simple/ScanlineBoolean2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="ScanlineBoolean2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/SimpleBlur.dpr b/Examples/Simple/SimpleBlur.dpr index 623225a..7747aac 100644 --- a/Examples/Simple/SimpleBlur.dpr +++ b/Examples/Simple/SimpleBlur.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', @@ -25,7 +36,7 @@ uses AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggRasterizerOutlineAA in '..\..\Source\AggRasterizerOutlineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLinePacked in '..\..\Source\AggScanLinePacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/SimpleBlur.lpi b/Examples/Simple/SimpleBlur.lpi index c01b0ef..89d9c95 100644 --- a/Examples/Simple/SimpleBlur.lpi +++ b/Examples/Simple/SimpleBlur.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="SimpleBlur"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/SvgTest.dpr b/Examples/Simple/SvgTest.dpr index 07cb35f..38f2c4f 100644 --- a/Examples/Simple/SvgTest.dpr +++ b/Examples/Simple/SvgTest.dpr @@ -8,8 +8,18 @@ program SvgTest; uses // FastMM4, SysUtils, - AggPlatformSupport, - AggFileUtils, + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggColor in '..\..\Source\AggColor.pas', AggPixelFormat in '..\..\Source\AggPixelFormat.pas', diff --git a/Examples/Simple/SvgTest.lpi b/Examples/Simple/SvgTest.lpi index 785f79b..62f7e00 100644 --- a/Examples/Simple/SvgTest.lpi +++ b/Examples/Simple/SvgTest.lpi @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="SvgTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> diff --git a/Examples/Simple/TransCurve1.dpr b/Examples/Simple/TransCurve1.dpr index 659a63a..603eea1 100644 --- a/Examples/Simple/TransCurve1.dpr +++ b/Examples/Simple/TransCurve1.dpr @@ -19,9 +19,19 @@ uses {$IFDEF USE_FASTMM4} FastMM4, {$ENDIF} + {$IFDEF AGG_WINDOWS} Windows, - - AggPlatformSupport, // please add the path to this file manually + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/TransCurve1.lpi b/Examples/Simple/TransCurve1.lpi index 684b1b8..9b5282a 100644 --- a/Examples/Simple/TransCurve1.lpi +++ b/Examples/Simple/TransCurve1.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TransCurve1"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/TransCurve1_ft.dpr b/Examples/Simple/TransCurve1_ft.dpr index 9deb1a0..223fb91 100644 --- a/Examples/Simple/TransCurve1_ft.dpr +++ b/Examples/Simple/TransCurve1_ft.dpr @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/TransCurve1_ft.lpi b/Examples/Simple/TransCurve1_ft.lpi index 1fedd07..cf72ed7 100644 --- a/Examples/Simple/TransCurve1_ft.lpi +++ b/Examples/Simple/TransCurve1_ft.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TransCurve1_ft"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/TransCurve2.dpr b/Examples/Simple/TransCurve2.dpr index 30b8478..553096e 100644 --- a/Examples/Simple/TransCurve2.dpr +++ b/Examples/Simple/TransCurve2.dpr @@ -19,9 +19,19 @@ uses {$IFDEF USE_FASTMM4} FastMM4, {$ENDIF} + {$IFDEF AGG_WINDOWS} Windows, - - AggPlatformSupport, // please add the path to this file manually + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/TransCurve2.lpi b/Examples/Simple/TransCurve2.lpi index 6ac6610..77690ee 100644 --- a/Examples/Simple/TransCurve2.lpi +++ b/Examples/Simple/TransCurve2.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TransCurve2"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/TransCurve2_ft.dpr b/Examples/Simple/TransCurve2_ft.dpr index 5be11d8..85a41ac 100644 --- a/Examples/Simple/TransCurve2_ft.dpr +++ b/Examples/Simple/TransCurve2_ft.dpr @@ -20,7 +20,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', diff --git a/Examples/Simple/TransCurve2_ft.lpi b/Examples/Simple/TransCurve2_ft.lpi index e460d1f..ee9d7a0 100644 --- a/Examples/Simple/TransCurve2_ft.lpi +++ b/Examples/Simple/TransCurve2_ft.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TransCurve2_ft"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/TransPolar.dpr b/Examples/Simple/TransPolar.dpr index 7885046..5c27100 100644 --- a/Examples/Simple/TransPolar.dpr +++ b/Examples/Simple/TransPolar.dpr @@ -10,7 +10,18 @@ uses FastMM4, {$ENDIF} - AggPlatformSupport, // please add the path to this file manually + {$IFDEF AGG_WINDOWS} + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_LINUX} + AggPlatformSupport in '..\..\Source\Platform\linux\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\linux\AggFileUtils.pas', + {$ENDIF} + {$IFDEF AGG_MACOSX} + AggPlatformSupport in '..\..\Source\Platform\mac\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\mac\AggFileUtils.pas', + {$ENDIF} AggBasics in '..\..\Source\AggBasics.pas', AggMath in '..\..\Source\AggMath.pas', @@ -26,7 +37,7 @@ uses AggRendererBase in '..\..\Source\AggRendererBase.pas', AggRendererScanLine in '..\..\Source\AggRendererScanLine.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', AggConvTransform in '..\..\Source\AggConvTransform.pas', diff --git a/Examples/Simple/TransPolar.lpi b/Examples/Simple/TransPolar.lpi index 2c26522..16b6063 100644 --- a/Examples/Simple/TransPolar.lpi +++ b/Examples/Simple/TransPolar.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TransPolar"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Examples/Simple/TrueTypeTest.dpr b/Examples/Simple/TrueTypeTest.dpr index e3dc220..8f60150 100644 --- a/Examples/Simple/TrueTypeTest.dpr +++ b/Examples/Simple/TrueTypeTest.dpr @@ -9,10 +9,10 @@ uses {$IFDEF USE_FASTMM4} FastMM4, {$ENDIF} - Windows, SysUtils, - - AggPlatformSupport, // please add the path to this file manually + Windows, + AggPlatformSupport in '..\..\Source\Platform\win\AggPlatformSupport.pas', + AggFileUtils in '..\..\Source\Platform\win\AggFileUtils.pas', AggBasics in '..\..\Source\AggBasics.pas', @@ -31,7 +31,7 @@ uses AggRendererPrimitives in '..\..\Source\AggRendererPrimitives.pas', AggRasterizerScanLineAA in '..\..\Source\AggRasterizerScanLineAA.pas', AggScanLine in '..\..\Source\AggScanLine.pas', - AggScanlineUnpacked in '..\..\Source\AggScanlineUnpacked.pas', + AggScanLineUnpacked in '..\..\Source\AggScanLineUnpacked.pas', AggScanLineBin in '..\..\Source\AggScanLineBin.pas', AggRenderScanLines in '..\..\Source\AggRenderScanLines.pas', diff --git a/Examples/Simple/TrueTypeTest.lpi b/Examples/Simple/TrueTypeTest.lpi index eeda121..1abb0c4 100644 --- a/Examples/Simple/TrueTypeTest.lpi +++ b/Examples/Simple/TrueTypeTest.lpi @@ -1,15 +1,15 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <CONFIG> <ProjectOptions> - <Version Value="9"/> + <Version Value="12"/> <PathDelim Value="\"/> <General> <Flags> <MainUnitHasCreateFormStatements Value="False"/> <MainUnitHasTitleStatement Value="False"/> + <CompatibilityMode Value="True"/> </Flags> <SessionStorage Value="InProjectDir"/> - <MainUnit Value="0"/> <Title Value="TrueTypeTest"/> <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -17,21 +17,17 @@ <i18n> <EnableI18N LFM="False"/> </i18n> - <VersionInfo> - <StringTable ProductVersion=""/> - </VersionInfo> <BuildModes Count="1"> <Item1 Name="Default" Default="True"/> </BuildModes> <PublishOptions> <Version Value="2"/> - <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> - <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> </PublishOptions> <RunParams> - <local> - <FormatVersion Value="1"/> - </local> + <FormatVersion Value="2"/> + <Modes Count="1"> + <Mode0 Name="default"/> + </Modes> </RunParams> <Units Count="1"> <Unit0> @@ -75,12 +71,6 @@ </Win32> </Options> </Linking> - <Other> - <CompilerMessages> - <UseMsgFile Value="True"/> - </CompilerMessages> - <CompilerPath Value="$(CompPath)"/> - </Other> </CompilerOptions> <Debugging> <Exceptions Count="3"> diff --git a/Resources/Fonts/arial.ttf b/Resources/Fonts/arial.ttf new file mode 100755 index 0000000..ff0815c Binary files /dev/null and b/Resources/Fonts/arial.ttf differ diff --git a/Resources/Fonts/times.ttf b/Resources/Fonts/times.ttf new file mode 100755 index 0000000..a998fee Binary files /dev/null and b/Resources/Fonts/times.ttf differ diff --git a/Resources/Fonts/timesi.ttf b/Resources/Fonts/timesi.ttf new file mode 100755 index 0000000..28798d3 Binary files /dev/null and b/Resources/Fonts/timesi.ttf differ diff --git a/Resources/Fonts/verdana.ttf b/Resources/Fonts/verdana.ttf new file mode 100755 index 0000000..8f25a64 Binary files /dev/null and b/Resources/Fonts/verdana.ttf differ diff --git a/Resources/Ppm/1.ppm b/Resources/Ppm/1.ppm new file mode 100755 index 0000000..7994765 Binary files /dev/null and b/Resources/Ppm/1.ppm differ diff --git a/Resources/Ppm/2.ppm b/Resources/Ppm/2.ppm new file mode 100755 index 0000000..3bfd2ce Binary files /dev/null and b/Resources/Ppm/2.ppm differ diff --git a/Resources/Ppm/3.ppm b/Resources/Ppm/3.ppm new file mode 100755 index 0000000..acff54f Binary files /dev/null and b/Resources/Ppm/3.ppm differ diff --git a/Resources/Ppm/4.ppm b/Resources/Ppm/4.ppm new file mode 100755 index 0000000..0c643fb --- /dev/null +++ b/Resources/Ppm/4.ppm @@ -0,0 +1,5 @@ +P6 +# Created by IrfanView +21 15 +255 +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøøÿÛÛÿþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøùÿÐÓÿýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÙÙÿ©ªÿééÿÿÿÿÿÿÿýýÿûûÿÿÿÿ×Úÿ•œÿÝßÿÿÿÿññÿ®«ÿïïÿúüÿÄÖÿª¾ÿÿÿÿÿÿÿÿÿÿááÿ°±ÿÚÜÿòòÿÁÁÿÆÈÿãåÿÿÿÿáãÿ•œÿîïÿóôÿœ¡ÿbbÿÄÂÿËÜÿ}ŒÿptÿññÿÿÿÿÿÿÿúúÿÎÏÿÜßÿßßÿ²²ÿ½¾ÿââÿÿÿÿùùÿƒ€ÿœ‘ÿÔÖÿ…ÿciÿÍËÿïôÿª©ÿ®«ÿ÷öÿÿÿÿÿÿÿûûÿÿÿÿêëÿùùÿòðÿ·¯ÿ –ÿòòÿôõÿÆÂÿËÌÿö÷ÿ²ÆÿÊÍÿçåÿÿÿÿøúÿØäÿøúÿÿÿÿììÿ¹¹ÿüüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿØÚÿ”œÿÖÙÿÜßÿùùÿ¾·ÿ–‹ÿŸ•ÿççÿèíÿ¯ÈÿÀÔÿÀ¾ÿˆ„ÿ©©ÿææÿíîÿõöÿÿÿÿßÞÿ˜“ÿššÿpxÿÈÌÿâéÿÝèÿø÷ÿlgÿkjÿ”šÿ›¢ÿÚæÿèîÿ˜”ÿˆ„ÿÿÿÿÿÿÿíîÿÜßÿëéÿª¢ÿ¤¡ÿ¬¬ÿØØÿûüÿ¸ÎÿÅÊÿåãÿ««ÿtuÿ•œÿÄÈÿø÷ÿø÷ÿÿÿÿÿÿÿÿÿÿòòÿóóÿóôÿÅÄÿýýÿýýÿ·±ÿÖÕÿÛßÿßâÿœ‘ÿ†ŒÿàèÿöùÿÁÒÿëðÿúúÿ©§ÿËÉÿÿÿÿÿÿÿÕÕÿÍÍÿÿÿÿßßÿÆÈÿÆÂÿœ‘ÿÏÊÿÒÕÿº¿ÿÓÎÿ¦²ÿ²»ÿóöÿŸµÿoyÿïôÿüüÿÛÚÿïïÿÿÿÿïïÿÕÕÿÿÿÿÿÿÿïïÿ¥žÿœ‘ÿÐËÿñòÿÄÈÿÿÿÿäìÿòóÿøùÿ½Ðÿq}ÿÇÕÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüÿÿÿÿÿÿÿÿÿÿðîÿ´¬ÿïíÿÿÿÿýýÿÿÿÿÿÿÿÿÿÿÿÿÿúüÿêîÿ÷øÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/Resources/Ppm/5.ppm b/Resources/Ppm/5.ppm new file mode 100755 index 0000000..59658c7 Binary files /dev/null and b/Resources/Ppm/5.ppm differ diff --git a/Resources/Ppm/6.ppm b/Resources/Ppm/6.ppm new file mode 100755 index 0000000..73c0b9b Binary files /dev/null and b/Resources/Ppm/6.ppm differ diff --git a/Resources/Ppm/7.ppm b/Resources/Ppm/7.ppm new file mode 100755 index 0000000..f1b97c9 Binary files /dev/null and b/Resources/Ppm/7.ppm differ diff --git a/Resources/Ppm/8.ppm b/Resources/Ppm/8.ppm new file mode 100755 index 0000000..23183e3 --- /dev/null +++ b/Resources/Ppm/8.ppm @@ -0,0 +1,5 @@ +P6 +# Created by IrfanView +26 15 +255 +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÛ¸¦õìèÒ¥Ž¹rO¥Jš5š5š5£HµkFÓ§‘ÿÿÿÿÿÿ×®šõìçÍ›‚¶mI¢Eš5š5š5¦M ·pLÚµ£ÿÿÿÿÿÿ«V,Û¸¦< š5š5š5š5š5š5š5½|[ÿÿÿúõó Aß¿¯š5š5š5š5š5š5š5š5É”yÿÿÿóçáš5ÈjÅŠmš5š5š5š5š5š5š5Û¸¦ÿÿÿÒ¥Žš5Ï ˆ·pLš5š5š5š5š5š5š5çÏÃÿÿÿÅŠmš5¦M òåÞ›7š5š5š5š5š5›7øñíýúù¦M š5²e>æÍÀš5š5š5š5š5š5¡Cþýü÷îêŸ>š5š5íÛÒ¼yXš5š5š5š5š5²e>ÿÿÿÚµ£š5š5›7øñí±b;š5š5š5š5š5½|[ÿÿÿÍ›‚š5š5š5Ï ˆìÙÏš5š5š5š5š5Ï ˆÿÿÿ«V,š5š5š5Û¸¦ß¿¯š5š5š5š5š5Û¸¦ûøö¢Eš5š5š5²e>ÿÿÿµkFš5š5š5š5íÛÒáĵš5š5š5š5½|[þýü©T)š5š5š5›7øñíÔ©”š5š5š5š5›7øñíäÉ»š5š5š5¥Jÿÿÿ³gAš5š5š5š5¡Cþýü×®šš5š5š5²e>þýü§O#š5š5š5š5š5Û¸¦ÿÿÿ­[2š5š5½|[èÑÆš5š5š5š5š5š5çÏÃýúù£Hš5š5Ï ˆÝº©š5š5š5š5š5š5½|[ÿÿÿݺ©š5š5Û¸¦ºuRš5š5š5š5š5š5É”yÿÿÿÏ ˆš5š5íÛÒ­[2š5š5š5š5š5š5¡Cþýüþýü§O#›7éÔÉ›7š5š5š5š5š5š5¬Y/ÿÿÿùóðŸ>¢EäÉ»š5š5š5š5š5š5š5š5çÏÃÿÿÿÔ©”²e>Â…gš5š5š5š5š5š5š5š5÷îêÿÿÿÈ‘v½|[µkFš5š5š5š5š5š5¬Y/½|[ìÙÏÿÿÿûøöرäɻ…g­[2š5š5š5š5®]5Â…gôéäÿÿÿôéäÞ½¬Þ½¬¿~^«V,š5š5ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/Resources/Ppm/9.ppm b/Resources/Ppm/9.ppm new file mode 100755 index 0000000..dfd9ddc --- /dev/null +++ b/Resources/Ppm/9.ppm @@ -0,0 +1,5 @@ +P6 +# Created by IrfanView +41 25 +255 +ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþýÿýúÿÿÿÿýûÿþýÿÿÿÿÿÿÿþýÿýûÿÿÿÿÿÿÿýüÿýúÿÿÿÿÿÿÿþüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìÚÿüúÿÿÿÿùôÿñâÿõêÿéÓÿôéÿÿÿÿÿÿÿõêÿäÈÿÿÿÿÿÿÿïáÿàÆÿôéÿÿÿÿðáÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿß¿ÿçÐÿÿÿÿÿÿÿسÿåËÿÌœÿêÓÿøðÿÿÿÿúóÿÇŠÿúõÿÿÿÿÞÁÿÌ¢ÿÛ¹ÿþýÿÞÀÿþýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿáÄÿΞÿûøÿÿÿÿÉ•ÿѤÿÈ“ÿÜ»ÿݸÿû÷ÿòçÿ·jÿãÅÿøñÿßÂÿ¸|ÿËÿæÏÿßÁÿìÚÿýûÿû÷ÿÿÿÿÿÿÿÿÿÿ÷ïÿýûÿÿÿÿþýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿíÚÿÀƒÿáÅÿÿÿÿÒ¦ÿ²gÿÖ¯ÿ¼|ÿÊÿÖ¬ÿðâÿ´cÿ¿{ÿçÒÿÙµÿ«bÿ¥SÿÌÿæÏÿÌ›ÿâÂÿþýÿÿÿÿüùÿàÆÿâÆÿÿÿÿê×ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿû÷ÿîÜÿþüÿÿÿÿÿÿÿøòÿºwÿ¼|ÿõëÿݼÿœ>ÿÚ¶ÿ¦Pÿ³cÿ½zÿÿÿÿ·iÿ¨MÿÖ©ÿ²iÿ¡Oÿ¡Nÿ¸vÿÛ·ÿ¤JÿáÂÿÿÿÿöîÿÃÿ‰ÿöíÿÛºÿóçÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿùóÿТÿÑ¥ÿðâÿÿÿÿÆŒÿ±eÿÆÿΜÿ›;ÿ²jÿ‘,ÿ›7ÿ¼uÿðãÿ¨Mÿ¢>ÿ¬Vÿ­`ÿš@ÿ¢Sÿ«]ÿ¨Pÿ¡DÿÞ¾ÿîÞÿ°lÿ¬bÿÖ¯ÿݾÿسÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîÞÿåËÿ÷îÿû÷ÿê×ÿèÒÿʘÿ¯dÿ³kÿºxÿ¬[ÿ·mÿºpÿ—,ÿ›8ÿ(ÿ†ÿ’.ÿDÿ“(ÿ—,ÿš3ÿ­[ÿ¥TÿžKÿ“/ÿœ;ÿ®bÿµpÿ¦Zÿ¡NÿºzÿÖ¯ÿÁ‡ÿøòÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿíÛÿÄŠÿ´kÿÉÿÈ“ÿ¼|ÿ¬Zÿ™5ÿ“(ÿ“%ÿš6ÿ³hÿ™/ÿ–&ÿ–)ÿ—,ÿŒ ÿˆÿ‰ÿˆÿŠÿ”,ÿEÿŠ!ÿŒ!ÿŸEÿ¢Jÿ‘-ÿ–8ÿ©ZÿÁ†ÿ¾ÿàÃÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìÚÿ¾ÿªYÿ©Wÿ£Kÿš9ÿŒÿŠÿŒÿÿÿÿ–'ÿ—(ÿ—'ÿ ÿ‡ÿˆÿŠÿˆÿ†ÿ…ÿ‡ÿŽ%ÿ$ÿŠ ÿ”1ÿ¯eÿ¶rÿÅÿüùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿëÖÿ¾~ÿ«Zÿ¨VÿžAÿŠÿ‰ÿŠÿŒÿŽÿÿ“#ÿ–&ÿ—(ÿ”%ÿ‰ÿ†ÿ‰ÿ‰ÿ‡ÿ‡ÿˆÿ‰ÿ"ÿ–4ÿ¨Vÿ¾ÿèÓÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþüÿΛÿ«[ÿ™6ÿ’(ÿ‰ÿŠÿŠÿ‹ÿÿÿ•%ÿ–'ÿÿŠÿˆÿ„ÿˆÿŠÿˆÿˆÿ‹ÿ’+ÿŸEÿ¶pÿË™ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøòÿÇÿ£Hÿ•,ÿ‘&ÿŠÿ‹ ÿŠÿŒÿÿ‘ÿ”#ÿÿ‰ÿ‡ÿ„ÿ‚ÿ†ÿ‡ÿ†ÿ†ÿ‡ÿŠÿ&ÿ˜5ÿ£KÿµpÿÅŽÿ×±ÿçÐÿéÔÿéÔÿìÚÿùóÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿåÊÿ­[ÿš6ÿ”+ÿ‘'ÿ#ÿ‹ ÿŒÿÿÿ’!ÿÿŠÿˆÿ†ÿ…ÿ‚ÿ†ÿ†ÿ…ÿ…ÿ…ÿ†ÿ†ÿ‡ÿˆÿ‰ÿ"ÿ&ÿ’,ÿ™:ÿ¤OÿºyÿÑ¥ÿæÎÿõìÿÿÿÿÿÿÿÿÿÿòåÿÇÿ©Tÿ¦Nÿ©WÿœAÿ’.ÿ&ÿÿÿÿÿŠÿŠÿ‰ÿ‰ÿ‡ÿˆÿ‡ÿ†ÿ†ÿ…ÿ‰ÿ†ÿ†ÿ†ÿˆÿ‰ÿŒ"ÿ•4ÿ¥Sÿº}ÿÔ®ÿæÑÿþüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷îÿСÿĉÿÁ…ÿ·tÿ©Yÿ°gÿªYÿ–.ÿÿ‘ÿÿ$ÿ ÿŽ"ÿŒÿ‹ÿ"ÿŒÿ‹ÿŠ!ÿ‰ ÿ†ÿ*ÿŠÿŽ$ÿ•2ÿ¡Gÿ³iÿëØÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöìÿ×®ÿâÅÿÓ¨ÿÍžÿΠÿíÜÿÛ·ÿ¦Lÿ™2ÿž8ÿ¡Bÿ’)ÿ(ÿ#ÿ!ÿ"ÿ–.ÿ˜/ÿ’&ÿŽ ÿ“2ÿ’/ÿ%ÿ‘+ÿ'ÿ‘-ÿªZÿ¡Jÿ¥QÿÄÿþüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóçÿöíÿæÎÿõìÿöíÿÿÿÿñäÿÓ¨ÿ¼xÿ¦Nÿ¨QÿÊ•ÿš=ÿ›>ÿ“&ÿ•(ÿ—.ÿŸ@ÿ«Qÿ—1ÿ‹ÿ”3ÿ¤Mÿ—5ÿ–2ÿ#ÿ¤Sÿ±lÿ°hÿ©Yÿ©YÿÜ»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿéÔÿÀÿ¦NÿÂ…ÿײÿ§WÿÊÿš5ÿ”'ÿ¤Iÿ®\ÿ¢Dÿ¡Gÿ›?ÿ‘-ÿ¦Rÿ¨Tÿ¢Hÿ%ÿª_ÿ¼…ÿÃŽÿ¾„ÿ±hÿ°fÿòæÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿéÔÿ¾}ÿ­[ÿßÀÿÓªÿ°iÿ÷ðÿ¸pÿ—,ÿ¯]ÿÀ~ÿ³gÿ’,ÿÒªÿ¢Oÿ?ÿ»zÿ«Xÿ Fÿ§UÿÈ™ÿÕ²ÿÊœÿÖ³ÿ¸vÿÁ†ÿþüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿéÔÿÅŠÿÉÿíÜÿÌÿÃÿÿÿÿÈÿ¯]ÿ®\ÿÉŽÿÕ«ÿ?ÿ¾†ÿÝÁÿ«]ÿ»yÿ´lÿ¹qÿΠÿÆŽÿͤÿñäÿÒªÿîÝÿÆÿÚ¸ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿéÔÿË—ÿײÿùóÿÈ•ÿãÊÿÿÿÿĉÿÌ—ÿéÓÿÀzÿàÃÿÌ™ÿ¼ƒÿìÛÿЦÿТÿ½}ÿãÇÿéÏÿÖ°ÿêÕÿÝÁÿþýÿãËÿýüÿÛ¹ÿõìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿæÌÿæÌÿáÅÿÿÿÿФÿýûÿÿÿÿÓ¦ÿäÈÿÿÿÿÚ³ÿݽÿëÖÿåÐÿôëÿàÅÿøðÿÈ”ÿû÷ÿýûÿúöÿîßÿüúÿ÷ðÿÿÿÿüùÿÿÿÿúôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïàÿýúÿñãÿÿÿÿéÔÿÿÿÿÿÿÿîÝÿòãÿÿÿÿõêÿðàÿû÷ÿøñÿÿÿÿñäÿÿÿÿåÍÿÿÿÿÿÿÿÿÿÿþýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþýÿÿÿÿýûÿÿÿÿþýÿÿÿÿÿÿÿýúÿþýÿÿÿÿÿÿÿþýÿÿÿÿÿÿÿÿÿÿþýÿÿÿÿüùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/Resources/Ppm/agg.ppm b/Resources/Ppm/agg.ppm new file mode 100755 index 0000000..90f1c8f Binary files /dev/null and b/Resources/Ppm/agg.ppm differ diff --git a/Resources/Ppm/compositing.ppm b/Resources/Ppm/compositing.ppm new file mode 100755 index 0000000..c1b8958 --- /dev/null +++ b/Resources/Ppm/compositing.ppm @@ -0,0 +1,101 @@ +P6 +# Created by IrfanView +149 143 +255 +kifTRPDCB431 +=;9zwu³°­ÜÙÕàÜØ¼¸³smi.("VPH¨¡™ÕÍĬ¥›WPF1*pi^¾·¬º³¨icXTNCª¥šæáÖ«¦c_U‡‚z˜“ŒPKCD=3ƒznuhXYH6“€iœ†ozdJ¡‰n¥Œqy\¬—x¡ŽmŸŽm©–w£qàÙͨ•tª—v«˜w¬™x®›z±ž}´¡€¶¢¶¢µ¢‚´¡³ €±Ÿ²Ÿ³ €´ €³ ´ ´ €´ €´ ŸŽtš‰oœŒp£’w¥”z¤•{¢’y¡‘yŸwŽvžwŸ‘y¡“|¡”}¤˜¥šƒ¤›ƒ¢š‚¡™‚¤…¤ ‰¡£ ¥‘Ÿ§” ª—¬˜—©˜’¥•Œ¡‘‡„™Œ—Š€–‡€–‡˜‰ƒš‹˜Š}“…r‰{w‹vŠ}fxlxŠ~w‡}[ias‚xƒˆZe\^i`‹•‹t|sHNDlqfœ –x|rBK?XaT—¢•ž©ere7F8VfXœ¬ž¿ÏÀŸ° aqc7G:HTJƒŽ…ÁËÂçîçàæàÀž•\b\8>8&,&UROMKI=;9%$#MKI‚|»·´ãßÛßÛ×®ª¥fa\("%]WO°©¡ÖÏÆ¤“QJ@71&|ukÊĺÁ¼²zukpmcÅÁ¸ÑÌÅtpi@;4ysj‰}PH:SH9šŒzŠxdnYC¦‘x¢r‚mSª•{¥v“d¬›|Ÿp¡p«™yª—vâÛЯœ{°|°{¯œ{°|±ž}³Ÿ~µ¡µ¡´¡€´¡µ¢‚´¡´¡€´¡€´¡€µ¡€µ¡€µ¡€µ¡µ¡ŸŽt›ŠožŽs¦–{§—}§—}¨˜~¨™¥–}¡’y¡’y£”|¤–~§™ª†ªŸ‡ªŸˆ© ˆ¨ ‰§ ‰§¢‹¥¤£¤¢¥’Ÿ¥’¥“𥕕¢“‘ ’Œ†™Œ‚—Š—‡}–†€™‰€š‹™‹|–ˆtŽv‚x’ƒd~ptŒ€xŽ‚Yndp‚y‚’‰Yi_\j`ˆ”‹yƒxHPFfmb˜“€…{BJ?T]PšŽ£¯£ivi8F9P_Q“¤•¾Î¿¨¸ªevh<L>CPDw„y³¾µÞçÞâêâÈÏÈ“™“`ga=D>%,&NKH752(&#  /-+\ZW–“ÎËÇèäàØÔÏ¡œ˜TNI#,& pjcÁ»³ÒÌ×KF<GB8”…áÝÔÏËÄ€xkg_ œ•§¢›ZTM:2*„{n—Ž|\O=rbN±ŸŠ’gzfM®›¤‘wŒz`µ¥‹¦–|”„j®ŸŸr¤“s®|®›xãÜаœ{¯œz­šy¬™x­šx®›z¯œ{²ž{³Ÿ}µ¡€µ¢·¤ƒ¹¦…»§†º¦…¸¥„¹¥„¹¤ƒ¸¤‚¸¤ƒ·£‚¡sœŒp¢’w©™~«›€¬œ‚¯Ÿ„°¡…­žƒ©š¨˜~¨™€«œ„«†­Ÿˆ¬ ˆ¯¤Œ°¦®¥Ž¬£©¢Œ¥¡Œ£¡¡ ŸŸŒœžšŸ˜Ÿ•Ÿ‘’Ÿ‘‰˜‹ƒ•ˆ•…|”ƒ}•„~—‡~™Š}š‹v’…v”†x–ˆeƒur‚z”Š\sim‚yƒ—]oeXh^†“‰}ˆKTJag^•›‘…ŒHPEISFŒ–Š£®¢s€s?M?HWI†–ˆ½Í¾«¼­rƒuAQC=K?gth§³©ÖàÖäíäÊÒÊ¡ª¢wwHPI*2+2/+*'$! + !GDBzwt«¨¥ÛØÔæâÞÊÅÁˆ‚}HB=;5.„~wÏÊÁÏÊÁ‹†}HC:[WNº¶®óðè±­¦OJENIB˜“‹›”‹LC7I>/¦–ƒlZE…r\½©’’g€mT·¦‹¤’x“ƒi¸©Ž¤–yœ‹o²¡„¢‘s§–v¬šz«™wâÜЮ›z®›z­šy¬™x¬™x­šy¯œ{²ž{´ }·£º¦…½©ˆ¿«ŠÁ­‹¾ªˆº§…º¦„»¥ƒ¾§…¾¨†½¨…¤’t r¨—{®‚± …± …± …° …¯Ÿƒ¯žƒ®ž„±¡‡³¤‹³¤Œ²¤±¤Œ±¥Ž°¦°¦®¥«£Ž¥ŸŒ£žŠ¡›‰žšˆœ™ˆ™˜ˆ˜™Š•™‹‘™‹‹–‰…’…“ƒ~’|“‚}”„€˜‰™‹z–ˆv“†z™‹h‡yo‚|™Žbzpkƒx…›’fyoTe[Ž„…‡PZQV_U‘˜•‹NWKFOB~ˆ|¦±¥}‰}AOB>M?xˆz²Ã´¶È¸~IZL6F8Zh\œ‘ÇÓÈàêá×áׯ¹°‰€XbZ4>7%! + +963]YV–’ÆÂ¿àÜØßÚÕ¶±¬ojd83,#PKC¤Ÿ—ØÓËÈû†‚yRNFxtm¼º²ÌÈÂ{vq50*PJB–Œ•ŒSH7eVD´¢§’€mXD™„nÀ¬”|dŽ|cÁ¯”¥•z–‡l»«Ž¤”v¢rµ£…¢pª—wª™x¨˜wâÛÏ­šy®›z­šy­šy­šy®›z°{³Ÿ|¶¢~¹¥‚¼¨‡¾ª‰À¬‹À¬Š¾ª‡¼¨†»¦ƒ½§„¬‡Æ°ŒÅ°‹©˜x¥“w¬›€³¢…¶¥‰µ¥ˆ³£†²¡…²¢†²¢†´£‡´£‰µ¥‹¶¦Ž¶§¶¨‘´¨‘³¨‘±¦®¤© Œ¥Š£›ˆ ˜†Ÿ˜†—†›—†—•…•–‡”—‰–ˆ‹“…„€Ž~‘‚•†–ˆz”†v‘„|™Œj‰|mŒœ‘eue}s‡”mwTf\zЉ—Ze[PYOˆ‡‘™[dX=G:qzn¥°¤Œ—‹MYM5B6jyk¦·¨·Éº“¥–UfX4D6CRE|‹~­»¯Õâ××äÙÂÎÄ™¤›gsiFQH + + 3/,VROˆ„°¬©ÓÎÊåáÜÑÌÇ•‘‹WSL#3.'kh_¿»³åáÙÁ½¶xtmGC<he_²¯©«§¡a[T/(i`S´©š’…tWH5|jW¯›œ‡sq]G¦’{¿«“‰w]šˆoijšžŽtŸs¼¬žŽq§–w´¢„¢q¬™z¬™y«˜wâÛÏ®›z®›{®›z®›z¯œ{²ž|µ¡~·£~¸¤€º¦ƒ¼¨…½©†½©ˆÀ¬Š¿¬Š¾«‡¼¨…½©…¿«ˆÄ°ŒÇ³¬›|¨—z°Ÿ‚¶¥ˆ¹©¹¨·¦Šµ¥‰²¢‡±¡„± …°¡…°¡ˆ³¥Œµ¨µ¨‘´¨’²¨’²¨’®¥ª¡¦‹£š‰¢˜† —…Ÿ—…ž—…™‡›™‰—˜‰”–ˆ‚…‹|€‰y€‹{Ž~‚‘‚“†}“…vŽ}—Šmˆ|k‡{€šk„zczpƒ™xŒ‚Ug]s‚zž”andJTLy‚x– –eod=H;bma§›™£—[g[4B5TcU“¤•¸Ê»¢µ¦fwi<L>8G9`ob”£–ÆÕÈ׿ÚÎÜѬ¹¯ƒ†\i_ &";73WSOyuq©¥ ÒÍÉåàÜ×ÓÍ·³­xtm=91)$MHA›—áÝ×êçàš”C?962,qmf´®§œ•ŒMD:A7*”‰y¿² ‹}j]L8•ƒmŲœ}gwdM¶¤Œ·¥Œ…sZ¨—}³˜˜ˆn§—|¼¬›‹n¬›~²¡‚£‘r°ž~®›{¯œ{âÜЮ›z¯œ{¯œ|¯œ{±ž|µ¡~¹¤¼¨ƒ¾©…Á­‰Â­ŠÀ¬‰¾«ˆÀ¬‹Á­‹Á®ŠÁ­Š¿«ˆÀ¬‰Ã¯ŒÈ´‘®ž­œ´£†¸§Š¹©¹§·¦‹²¢‡¯Ÿ„­¬‚­ž„¯ ‡²¤Œ³¦Žµ¨‘´¨’³§‘²¦‘¯¤Žª¡Œ¥œŠ¥›Š¢˜‡¢˜† ˜„ž—„—„™•„—”„‘‹Š|…†xƒ†w†wˆz‹}Œ|Ž€t‰|{’†q‰~g€u~–s‰€^ul”Š}‘‰Xj`hxo›’mzqFQHjsk•Ÿ–vu@K?NYMŽ™¡« q|p7E8>N@{Œ~°Ã³­À°‘‚IZK0A3DTFv†y¦¶©ÍÝÐÔã×ÄÓÈ¡°¥}‹‚$*% 72.D?;fa]|x©¤ŸÊÅÀÞÚÔÞÚÔÅÀ»‰‚WSL1-&A=6{wqÇľçãÞ»¸³fd_&#?:3‘нµª’‡zMA2bTD±£‘ĵ¢~nYiXA¬šƒÃ°™ƒqX„sYò™­œ‚ˆw^¸©À°–™‰n²£‡»ªŸŽq´£„°Ÿ€¨—w´£‚² ~µ¢äÝÒ²Ÿ~²Ÿ~±ž}±ž|³ }·£º¦ƒ¿«†Æ±Ê¶“dz¯‹¿­‰¿¬‰À­‹Ä°Å°ŒÃ¯ŠÃ¯ŠÄ°‹Æ²Ž®°Ÿ‚·¦‰·§‹¸§·¦‹´¤‰²¡ˆ­Ÿ…¬ƒ¬œƒ­…°¡‰³¤´¦µ¨’´¨’²¦°£Ž­¡ŒªžŠ§œŠ¤š‰£š‰¢˜†¡˜…Ÿ—ƒ›”™“–‘€’މ|‰†w…„vƒƒu„v…x|…xz†yq‚uyŒ€v‰~h}r{‘†xƒ^riuˆ„–\lc[kaˆ•Œy…}HTJZd[™‡‘‡MXLCMBz„y¤®£†‘†GTG6D7aqc˜©›µÈ¹œ®Ÿ]o`2D52C5UfXƒ”†²Ä·ÊÚÎËÚϺɾ¬¢GA;TNH`ZUzupމ„¶±¬ÊÅÀåàÚåáÛÌÈ¢ž—gc\<92<82c`[ž›–ÇÄ¿ÆÃ¿†ƒ~<83*%`XO¶­¡½±£}o_PA/r_ͽ©·¥‘n\FxeN°™¶¥{jR˜ˆo˼£¢’y‘‚hƶµ¦Œ™‰nÀ¯”¸¨Š£“tºª‰¯ž}¬›yµ¤±Ÿ|³¡}äÝÑ´¡¶£¶£µ£µ£º¦ƒÀ¬ˆÃ¯ŒÉµ‘Ë·“Ʋ°ŒÀ®Š¿­‰Â¯‹Æ²ÊµÍ·‘θ“˵ɴ¯ž²¡„¸§‹¸¨Ž¹©·§µ¥‹´¤‹±¡ˆ¯Ÿ‡­†®žˆ°¡‹²¤Žµ¦‘¶¨’¶¨’³§‘±¥®¢¬ Œ¨‰¨Š¥›‰¤›ˆ¤š‡¡˜†Ÿ—…•…œ”„—”ŽŠ{†„uƒs€r~rz~qzst{nwt|†{jujv„x~‚`pdkzo‡”ŠhtjUaX|†~‡’ˆU_WLUM‰“š’`h`?F>fnf˜¢™š¤š]h^2>3DRF‚‘…®¾²©»­~‚HYK+=/8J<`qdŠ›ŽµÆºËÜÐÇ×̽ÌÂztn‚{u”Žˆ¨¢œÃ½·ÑËÅäßÙàÛÕÎÊĨ¤~zsURL?<7GE@tqm¨¥¡ÈÄÀ©¥ _[T,&C;1’ˆ|δ® eVD]M:¤“€ÓÁ­ž‹viVA–ƒmμ¥£’{}mU³¤‹Ë½¤–‡n¡’yË»¡«œ¡‘vÄ´˜­œ¦–v¼«‹¬›y°ž|² ~®œy¯yãÜбž}³¡}´¢~µ¢~·¥¼¨…®‹Ç³Éµ’Ì·”̸•ɶ’ƴñŲɴ͸’Ò¼•Ô½—к•Ì·‘°ž² ƒ¹§‹º©Ž»«‘¹¨·§Žµ¥Œ´¤Œ²£‹°¡Š° Š±¡‹³¤Ž´¦¶¨’¶©”µ¨“²¦¯¤­¢©žŠ¨‹¦œ‰¥›Š¤›‰¢šˆ ˜‡ž–‡•†™‘‚•~މ{‡„v€~p}p||pz{nz|pwzovzo~vmshpym€‹grfdodƒŽƒt~tR\RnvnŒ•gogFMFlsl—œ–w}vELEKTL††ž¨Ÿ}‡~BNC5B7aod˜¦›²Ã¶š­žfwi7I;(:,;L?dthŽ’²Â·ÉØÎÄÓÉ«¥ž¹³¬ÆÀºÏÉÂâÝÖäߨàÜÕËÈÀ¨¥žˆ…~`^X:83750\YT™–‘Á½¸¹´­€zr?8.5+qfYÀ³¥ÎÁ±€oXH7ueRÅ´ É·£„r]p^H¶¤ŽÌº¤’‚j‹{cɹ¡¾¯–g°¢‰Ë¼¢ v«›󗤔w¯ž€»ª‹ª˜x³¡±ž~°|°{ãÝѳ ¶¤€¸¦‚¸¦‚º¨„¾ª‡Â®‹Æ²È´‘͹–Ó¿›Ð¼—̸“ɵɴͷѻ”Ó½–Ó½–Ñ»•Ϲ”´ µ£…¼ªŽ¾¬‘»«‘¸§Ž¶¥Œ³£Š²¢‰²¢Š²¢‹±¡‹²£Œ³¥µ§‘·ª”¸«–¶©”±¥®¢Ž©ŸŠ¨Š¨žŒ§žŒ¥œŠ¤›Š¡™‰ ˜ˆž˜ˆ›”„–މz‰„w‚€q}p}{o{znyymyynyyostj|}spsiinc~†{oxm[dYyw}†}V^U]e\‡†y€yHOIW^W“Œ‹ŠSYR?G?jskœ¦ž“ž•Zf\0>3BPEw†z¦·©­¿°ˆ™‹VgZ0A4&6)>MA`qe‰™Ž©¸­¿ÎÃÏÈÁ×ÑÉßÙÒâÜÕßÙÒ×ÓËÀ¼µ¥£œƒ|RPK.+&*'#ROJ†ƒ}»·±Á»´š“‰^UJ9.!WK=¦™ŠÔÇ·²£’l]L]M: |ÔÁ­°Ÿ‰sbLŠyb˺¢¾­—‡w^žuѧ«‚g¿°—À±—œŒqºªŽÁ±”§–xº©Œ¸¦ˆ«™z·¥…³ ´¡€´¡€æßÓº§†À®‹Á¯‹¾¬ˆÀ­‰Å±Å±ŽÄ±Ä²ŽÈµ’Ï»—м—κ•ι”к“Ô¾—ÚÄœÛÅÙÜ×ÁšÕ¿™¹¥…º¨ŠÁ¯’Á¯”¼«‘·§´¤Š²¢‰° ‡°¡‰±¡Š±¢‹³¤µ¦·©”¹«—¹¬˜¶©”±¥¬ ¨ž‹¦œ‰¦œ‹¦œŒ¥œ‹¤Œ¡šŠŸ˜ˆ–‡›•…–€‰|‰„w‚q~|o{ym|ynywlxvlxvmtrh{xowvmgg^vyox|r\_Wjne†}`f]QWNx~uƒ‰‚V^VGNFv{t”š“mrl@H?MUM†‡œ¦}ˆ~BNC.:0P^R†•‰©º­¤µ¨ƒ“†L\O.>1#3'5E:RaVu„y”£™ÜÖÍÚÔËÒÌÄÐËÂÇú²¯¨—”igc962%"+(#PLG†{·²«Êû¯§rh]E:-J>0†xiȺªÌ¾­n\L;yhUÁ¯›Ñ¿ª‘€io^FªšÓ©¡‘xƒsYº«Ì½£—‰ožu˼¢­ž‚žsŵ˜¶¦‡©˜zÀ¯‘±Ÿ¯~¸¦†·¤ƒ¹¦…º§†çáÕ½ª‰½ª‰½ª‡½«ˆÀ­ŠÅ±ŽÇ´Ä±Ã±Æ´Ë·’ѽ—ÖÀšÕ¿™ÖÀ˜ØÂ™ÜÆàÊ áÊ¢ßÉ¢ÞÈ¢À¬Á¯‘Æ´—IJ–¿­“¹¨Ž´¤Š±¡‰¯ ‡¯¡‰°£‹²¥Žµ¦¸ª”¹¬—»®šº¬˜µ©–°¥’« Ž¨ž‹¥œŠ¦œ‹¤›Š¤œ‹¤Œ¡šŠŸ˜‡œ•†š’„—‚’‹}ˆ„v‚€r~{nzxlyvkxtjwsivqiupgwrj|wpjg_one||tcd\__X{~uqtlMPIdia†‹ƒjohCHA^c]Ž“ˆŽ‡RYQ;C;ene– ˜”ž•fpf5@50;1^ma “¬¼¯¢±¥{Š~HXL,:/!0%,;1DSIapf¹³ª¹³«·²©¯¬¤•“trmGDA+(%&#.+%TPJ‡‚z»´«ÈÀ··®£„ymMA4B6(tgXº­ÕÇ·¦˜†gXE`O<¡|Öů´¡ŒucL…t\É·ŸÆµœŠz`’ƒhξ£ºª‘‚h¶§ÉºŸ ‘u¬ȸš«œ}± ¾­­›|³¡¶£ƒ¶£‚·¤ƒº§†æàÔ¸¥„¸¥„¸¥„º§†½ªˆÀ®ŠÃ±Â°ŒÃ±ŒÆ´Ë·’ѽ•ØÂ›ÛÅžÜÆžÝÇàÊ¡ãͤåÎ¥ãÍ¥â̦İı”È·šÅ´˜¿¯“º©´¤Œ±¢Š® ‰¯ Š¯¡Œ±£Ž²¥¶©“·«–¹­š¸¬™µ©–°¥“«¡¨žŒ¥›Š¦Œ¦Œ¦œ¤œ¡™Š–†š’ƒ—€•~“‹|Š…x‚s}zmzvkxtixsixrivpguphtle}unqkcid\{xppnfYWOrqi}~uWYQQTLz~v~ƒ{PVOGMFtzt”š”ounBIAENFxy¦††S]S1:05B7drf“¢–§µª ®£~ŒQ_T/<3,#!.%.;3‘Œƒ‘…„zhe`LIE/+'# %!>:5e`Z˜’‹Ã»²ÑȽº°¤†{nTG:E7)m_P©›ŒÕÇ·¼­œ{lZZK8†ta˹¥Ìº£Œycr_H¬š‚ÖÆ­©™€‚sY° †Ò¨£“y™‰oǹœ½¯‘Žq½­’ò–©™|¾­½«Œ°ž~¹§‡¶£ƒ·¤ƒ·¤ƒ¸¥„æßÓ·¤ƒ·¤ƒ·¤ƒ¸¥„º§…¼ª†¾«ˆÀ­‹Ã±Èµ‘κ”ÕÁ™ÛÅÝÇŸÞÈ àÊ¢âÌ£äÎ¥äÎ¥äÎ¥ãͦűIJ”É·›Æ´˜À°”ºª·¦²£‹¯¡Š® Š®ŸŠ¯¡Œ²¤µ¨“¶ª•¸«˜¶ª˜´©—¯¥“¬¢¨ž£šˆ¡˜† —†¢™‰¡˜‰ž—‡š“‚—€“‹}“Š|‰{ˆƒv~q}ymzvkxtixriwpgvofungqibwohvohg`Xtneyum]YRa_W~|uijaJLCdf_„‡€imeDICW]W‰‰‹’ŠX_W9@8T[S‡‡¤œzƒzGPF*5+8D9huj’Ÿ•¦²¨¤°¦„]h`:F=!,$&jg_XUO@=8-)%&"'#;61[VO}wo©¢™È¿¶Í·²¦šˆ{nVI;G9*fWG¢“ƒÒijʻª~k_O<rbN¶¥ØÆ°¨•ubKŽ|eν¥È¸ŸŽ~e“…k̼¢¾®•’‚h«œÌ¼ ¨š|¤•xÆ¶šµ¤ˆ®Ƶ—»©‰¶¤…½ªŠº§…»¨‡»¨‡¼©ˆçàÔ·¤ƒ¶£‚·¤ƒ¹¦…º§…º¨„»©…¾«‰Ä²Í»—ØÄžÞÊ¢àÊ¡àÊ àÊ¢áË£âÌ£âÌ£âÌ£ãÍ£ãͥŲIJ“É·›Ç¶™Ã²–½¬¸¨Ž´¤‹±¢‰¯¡‰¯¡‹±£Ž³¦‘¶ª•¸«—¹¬™·«™µ«˜¯¦“«¢¦‹¡™‡”‚š’€š’š’‚š’‚—€•~“‹}’‰|…x‡u}p}xmzukxsiwriupgupguogrlesleyskjd\jd\|wohd\WUMrqizzqSTLSTLyzs‚{SXQAGAini•Žx~wHNG;A:^e]‘—™ —w~vAJA)3*7B8bme˜¤®¦¦°¨‘›“q{sJUN1<5FB<63.2/+840EA<[UO~wo¡™Ã»¯Ðƺɾ²©€seSF7I;,hYI£•„ÔÅ´ÏÀ°›‹yiYFgWD¤“ÙDz½«•…r\zgO´¢‰Ô룓z„u\´¦ŒÑ餕|”…k²–½®‘˜Šl´¤‡Ã³—©˜z¶¥ˆÂ°’² º¨ˆº¨‡º§†º§†¹¦…º§…æßÔ¶£‚·¤ƒ¹¦…»¨‡¼ªˆ»¨„»¨…½ª‰Ã°ŽÍº–×ÃÚÆžÜÆÝÇÞÈŸàÊ£áË£áË¢áË¢áË¢â̤űIJ’ɸšÈ·™Å³˜¿¯”»«¶¦³£‹±£‹±¢Œ³¤µ¨“¹¬—º­™»®œ¹®›¶¬™²©–®¥’¨ ¢™‡œ”‚—~–Ž}•|“Œ|’‹{“‹|‘‰{†xˆtƒ}rzn}xl{vkwshtpfsofsoerofrmemibvsiokab]TqnetpgYVMb`W{zrih_KJCdc\ƒ„}lpjCHBINHyxЉiog=C=>D<gld“˜•š’qxp?I@'1)2;3U_Vˆ€ž¨ ¨±ªœ¥ž…އislRNJVRMd_Xsnf‰€¨ –½³¨ÏŸÍô¼°¡”†xobSPC4J<-pbS¢”„ÓÄ´ÎÀ°ž~m\KeS@•ƒoѾªÊ¸¢”‚ktaJžŒsÑ¿§ºª‡w]šŠpÏÀ¦¼®””ƒj«›Êºž¨™|Ÿq²”´¤‡§–y¿®¹¨‰±Ÿ€»¨ˆ¸¥…¹¦…¹¥„¸¥„·¤ƒæßÓ·¤ƒº§…¼©ˆ½©ˆ¼©ˆ¼ª†¼©†¾«ŠÂ°ŽÊ·“н—ÔÀ˜ÚÛÚÄœÛÅÞÇ ßÉ¢àÊ¢áÊ£ßÊ£Þɣ®ŽÃ°’É·™Ç¶™Å´˜À°”½®’¸¨µ¥Œ³¤Œ´£Œµ¥¸ª•»®š¼°œ½°ž¼°ž¸®›²©–®¥’¨ ¡™‡›“–Ž}”Œ{‘‰xˆx‡xˆzއy‹ƒv†sƒ|qyn}wlzukvqgsofqndomcllbmmbjjamlbrqfa`UcaWvtkdaYTRJnldyvoVSLNKDsrl~|Z_Y<@;TXSƒ‡ˆ†]a[8<4?D<hle•˜‘’—nvmENE&.',5,GPHnvo‹”Œ¡©¢¦®§¦ Š†›”Ž¥ž•¹±¦Å»¯ÍöËÀ²»¯ œ€}p`_QAJ<,TG7zl\¬Òijο®¢’‚qaOaP>{gȶ¡ÔÀ¬¡yvcK‹x`ȵœÌ¹¡–„k‰x^»ªÌ¼¡ŸŽt˜‡kÅ´˜»«›‹n²¢„Á±”©˜{± ƒÀ®³¡‚¸¦†¼©ˆº§†»¨‡»¨‡»¨‡º§†çàÔ»¨‡¾«ŠÀ­ŒÁ¯ŽÁ¯ŽÀ®‹À®ŠÁ®Ä²‘É·“о˜ÖÁ›ØÂœØÂœÙœÙÃÛÅŸÜÆ ÜÇ¡ÛÇ¢ÛÇ£¾¬Ž¿­’ŵ™Å³˜Á²–¾¯“¼­’¹©¶¦µ¥Žµ¥¸¨“»­˜¾±¿²ŸÀ³¡¾²¡»±žµ«š®¤’§ŒŸ–…š‘€–|”Œ{ˆxއw…w…wŒ„w‹„wˆt„}r{p~wmztjuqgtqfpndlkchj`gi_gh_eh\mncgg]\\RkkbppgWUMZYQvulnkdKHBUTNw{uu{uJOJ<A:_c]‡‹†…TXR37/AD<gjbŽ“Œ’˜’szrJQJ+2+")"7>7SZTszu‡Ž‰œ¤ž¶°§¾¶¬Ç½±Äº­¿³¥°£•—‰{tebUGQD5NA2fXIŽ€p½¯ŸÖȷ˼«|r`NdSA‹zhÅ´¡ÔÁ®­š†ygR‚pY¹§Ð¾¦¨—~…sZ§–|ÑÀ¦´¤Š‘f²¡…ɹ§—}¢“xô˜¶¦Š§—z¾­¼«´£†À¯‘¿®Ž¾¬À®Ã°Ä²‘ðéãØÄ²’ǵ•ȶ–ȶ–É·–È·”ʸ–˸˜Ë¸™Ì»™Ò¿œÖßÚÄ ÙÄ ØÃžÙÄžÚÅ ÛÈ¢ÛɤÛȤÛȦ½­¾¯“ô˜Â´˜À²–½¯”º«“¸ª‘·§·§·§‘º¬–¾°›Áµ Á¶¢Ã¸¥Á¶¤¿´¢º¯±§•¨žŸ–…š‘€–}•Œ|’‹zˆy…w‹„u‰‚tˆ‚tˆ‚t†sƒ|p~wl{ujwshushrpfmmbijagi`fi_de[hi^mme^_V``Xsrjfe\RPGecZzxp_\TFE=\_XyxjoiAG@<A:dic…Š„|{RVP/4-:?9ae_ˆŽˆ“™’…[a[6<6")#$+&295NUPfmi•‰¢™Œ¡–ˆ’†w…whvhYfXIUG8YK<fXI„vg¯¡‘̾­×ɸÀ±¡”ƒro_Nl[I’nȶ¤ÙÇ´±ž‹~lX}lV±Ÿ‰ÔÁ«¶£‹†t\™†nË»¡Å´š™ˆn£’wÌ»Ÿ»ªŸŽt¸§Äµ™«œ€µ¥‡Ä´•·§ˆ¾®Å´—ij•°’ò“Å´•È·˜É·˜ìæÛ̺œÌºœË¹™É¸˜Ë¹™Ëº™Í¼›Î½žÏ¿ŸÑÀŸÓ ÖÄ¡ØÄ¢×áØÄ¡ÙÅ¢ÙÆ£ÙÇ£ÚÈ¥ÚȦÚȧ½­“½®“´™Â´™¿±˜¼¯—¹¬”·ª”µ¨’´§‘³¦·ª•»¯šÀ´ŸÁ¶¢Å»§Äº§À¶¤º°ž³¨—¬¢¢šˆ›”ƒ˜‘™‘—€”‹}ˆz‹„u‰‚s†q…~p„}o{m|wj{ujxtivsisqhomdkkbhiahiagh_dd\lkdgf_[ZShg_sqiZWOSQHpmdurjRQIDH@chaz€ybha;A;=C=eke†Œ†yyNTN/5/695VYT||’–‘‰ˆpupKPL061%!% '/*rfWnaRi\LbTD_P@[M=_QBo`R‡xj¨™ŠÈº«ÕÆ·Òô°¡‘ˆxgl\KraPœ‹yͼ©ÛÉ·³¡…s`~nY¯ž‰Ô¬À­—}e}eÁ¯—ν¥¦–|˜ˆoij™Ç¶œ¦”z¬œƒÈ¸ž¸ª¯¡„Ä·™¿±”»¬ŽÇ·™Æµ˜Ä³–²•ó–Ƶ˜É¹œËºìçÜʻ̻žË»œË»œÌ»œÌ¼Î¾žÐÁ¡ÐÁ¡ÐÁ Ñ Ò¡Ó¢ÖĤÙȧÜÉ©ÜʪÛÉ©ÚɨÙȧØÇ§»¬’½®•´›Ãµœ¿²š¼°™¹­—¶«—³§”²§“²¦“´©–¹®š¼²ž¿µ¢Â¸¦Ä¸§Àµ¤º°Ÿ´©™­¤“¤›‹œ•„™’˜‘‚—‚–Ž€‘Š|Œ…x‰‚u†rƒ}p{m~yk|wjyujxsiuqirphomekkeiidhichhadd^gf_llecbY][TpmfjhaSPIYWPtqkkkcGKDFLFjnhy~x[`[;?:?D?dhc‚†€{ySWR361/2-FIEjmhˆŒ‡ŒŒ‚‡‚elgKRM/72"*&_P>dTCcTCj[KvhX†xhž€¶¦—;¯ØÊ»ÕƸ»¬›Œ{xhXk[Ko^ªš‰ÔñÓñ°žŒ‚p^p\¬›‡ÔïǶ¡™‡rŒ{d·§Òª°¡‰–‡n¶§ÐÀ¦³£‰¥–{´™Ãµš® †½°”ǹœ¼®‘ó•Ç·šÅµ™Åµ™Åµ™Ç¶šÊºžË»ŸÌ¼ íèÞ̾¡Ë¼ Ì¼ Î¾¡Í¾ Î¿¡ÑÁ¢Ñ¤Ñ£ÑÁ¢ÒäÒäÔÅ¥ÖÆ¦ÚɪÜ̬ÝÌ­Ü̬ÛÊ«ÚɪÙȪ¼¬”»­”Á³œÃµ¿²œ¼±›¸­™µ©–²§”±§’²§“´©–·¬š»±Ÿ¿´¢Â¸§Ã¸§À·§»²¡µ¬›¬¤“£›‹œ•„—€•Ž”“Œ‘‹}†zŒ…x‰ƒv„rƒ}p~ym{wjytjvrisphpogmmejjdhicfhcef`ee_bb]jjdkkd\\U`_Xqoib_YNLE_]Vuuncf_DGBLPKormy}x\`[9<7?B=ad`~|€ƒ~^b]:=:),)473SVSsxt…ІŒ’}…€lsoU]Zm“„rž®Ÿ¹ª›È¹ªÔŶØÊºÎ¿°¼­žŸ‘„uem]MufV“„s½­œØÈ·ÒÁ°¨—†€o^‚q^«›ˆÑÁ®Ç·£›ŠuŠyd° ‹Ò«ºª”™‰r«ž…ÐÁ©¾¯–¥–}¼­“̽¤µ¨µ©ŽÈº À²˜½¯•ǸǸǸžÇ¹ŸÆ¸žÈºŸÉ»¡É»¡Ê¼¢ìçÞʽ¢Ë¾¢Ì¾£Î¿¤ÏÀ¥ÐÁ¦ÒçÒħÒħÔŨÕǪÖȪÖȪÖȪØÈ«ÛÊ­ÜÌ®Ü̯Ü̯ÜÌ®Û̯¼¯—º­–¿³œÂµ ¿´ž¼±œ¹®›´«˜³©–±§–²¨–³©˜·®œ»²¡¾µ¥Â¹©Ã¹ªÂ¹©¾µ¥·¯Ÿ­¦–¤›•†—‘‚•€•”Ž‘Š~‡{‹…z‰ƒy†v†€t‚}q{wmyukusisqhnmfkkdiicghcfhcefadf`bc]bb^kkfdd_XWSdc]omhZXRNKFdb]tup]_ZBC?NPLqroy{w\^[;=::<8Y[W{|xƒ…‚knkHJG+/+*-*7;8SYUnsp‚ˆ…‰„‰Æ¸¥Ê½ªÏÁ°ÓƵÕÇ·ÏÁ°Â´£®ŸšŒ{p`rdTqbRŠ|j­žÒóÝͽǷ¦›‹z‚q_‹ziµ¥“Óñŵ¢œ‹xŠzg¯ŸŠÐÀ«À°›žy§˜ÍÀ©É¼¤«ž…´¦ÎÀ§½°—³¥ŒÅ¸ŸÆ¹ ¼¯—Ä·ŸÇº¡Ç» Ç»¡Ç»¡Ç»¡È»¢È»¢È¼£É½¤ìèßʾ¤Ì¿¥ÍÀ¦ÏÁ§ÒêÒĪÒĪÓÅªÔÆª×É®Ṵ̀Ṵ̀ÙË®ÖÈ­ØÉ®ÚʯÜ̱ßϳÞϳÝϳÜϲ¿²œº®™¿´ŸÂ¶¡À¶ ½² ¹¯œµ¬›³ªš±©˜°¨–³«š¸¯¼³¤¿·¨Ä»­Ä»­Ã»«¾¶§¸°¡°©š¦ž‘–‰—‘ƒ•‚’€‹~މ}‹…z‰„y‡‚w…u‚~s{pyvmxulusjqpgnngklejkehjegidfhddfbcea_a\deaije^^ZXWRgfakkeUSNNNIffbqrn[\XBB?MNKnolxyvbcaAA>785LLIopm„wzw]a^<?=)-)',)385HMJ]darxuÀ²Ÿ¾°¸ª˜¬ž¡’‚•†v‚tdwhXrcSwhXŒ}m¯ Í¾­ÝͽÔÄ´²£’o‚ra–†uÀ° ×ȷ󢜌{~l¯ŸŒÑÁ®Äµ¡Ÿ{£”É»¤ÎÀª¯¡‹°¢‹Ì½¦Ç¹¡´§Á´›ÍÀ¨Â¶žÅ¹¢Ê¾¦È½¥É½¥É½¥È½¥È½¥Ê¾¥Ê¾¦ÌÀ¨ÍªíéáͩΪÏêÐÄ«ÓÅ­ÔÆ®ÔÆ­ÓÇ­ÕÈ®×ɰØË±Ù̲Ù̲ÚͲÛͳÛÍ´ÝϵÝеÞѶßÒ·ÝзÁµŸ»°œ¾´ Á¸¤Á·¥¾´£¹°ž¶­³ªš±¨˜°¨˜²ªšµ­»²¤À¸ªÅ¼®Å½°Â»­¾¶¨·¯¢°©›¨¡”ž™Œ—’†’‘Œ‹މ~Š…{ˆƒz†‚xƒ€v|s|xnxulusksrjpoinnhlmgklgikfgiefhefhecfbbeb_a]egcfifYZWXZUjjfiieRRNPPKiifrroZYVCC?JJHjjg|{yjigHGD553??>[\\xzy€‚svtVZX;?=+0."(&&,*286sa{m[vhWufVn_OqbQvgV„uf™‹{´¥•ο¯ØÉ¹ÖǶ¿°Ÿœ|†wgŠ{k©š‰Î¿¯ØÉ¹º¬›—ˆw’ƒq´¤“ÓIJô¡¡’~¢’~Ŷ¡Î¿ª²¤Ž¬ŸˆÇº£Í¿©º¬•½±šÐĬȽ¦Çº¤Ì«ËÀªÌÀªÌÁªÌÁ©Ê¿¨ËÀ¨ÌÁ©ÌÁªÏÄ¬ÑÆ¯ïëãÓǰÒǰÒǰÒǯÒŮӯ¯ÓƯÓǰÕȱ×ʳ×ʳØË³Ù̳Ü϶ÞÒ¹ÞѸÞѸÞѸÞѸÞÒ¸ÞйÁµ¡»±ž¾´¢Â¸§Á·§¿¶¥º±¡·®Ÿ´«œ±©š²©š²©š´«¸°£¾¶©Ã»®Ä½°Ãº®¾¶ª¹±¥°©¨£–ž™˜“‡”ƒ“‚’ƒŽŠ€‹ˆ~‰…|†ƒz„€w{s{xpwtlurlqpjoohnnilmhknijmiilhgjgeigcgdadc`c`_b^ehedgdUWT[\XlmifgcRQMPPLihfsrp]]ZCB?HHFca_zzwsspTTR999445GGHeffz|{‚‚txw]aaEIH166&,,i]NocTtgX|o`Œ~mš{¯¡Ãµ¤Óŵ×ʹвº¬›¢”ƒ‹|l‡xgžÀ²¢×ɹÒ³²£”•†v˜Šz»¬œÓųÁ³¢¢“‚¤•ƒÆ·£Ñï·©•¬ŸŠÅ¶ ÑîÁ²¾±›ÏíÎÀ¬Ç»¥Î­Í­Í®ÎïÎîÎíÍìÎíÏÄ®ÐůÑǰÒȲðìåÔÉ´ÔÉ´ÔÊ´ÓɳÓɲÔȲÔȲÔɳÖ˵×̶ØÌ¶ØÌ¶ÚζÜиÞÒºÞÒºÞÒºÞÒºÞÒºÞÒ»ÞÒ¼À¶£º±ž¼³£Á¸¨Á¸¨½¶¦»³¤¸°¡¶® ²«›²ªš±©›³«·°£¼µ©Ã»®Å½²Ä¼°À¹­º³¨±«Ÿ¨¢—žšŽ˜“ˆ“„’ƒ‹Œˆ‰†}ˆ…|…‚zƒw€|t{xqxvourmrqkqojnojmnjknijnjjmigkiejibgfbfebfc_ba^b_figbdbVWT\^ZklieebOOMOOLffcttq``^EECBA@WWTrsqxxvbccFFG446557HII`bbuxx~‚x||lppY__¢˜Œ¥š®£–¹­ŸÂµ¦ÏÁ°Ñòɻª¿±¡ª–‰y‰{k†xi˜Šz¶¨˜Óŵ×ɺĵ¦¤•†“…u£–†Å·§ÕÇ·½¯Ÿ¡“ƒ§˜‡È¹¨ÓIJº¬š­ŸŒÃ¶¢ÓDZķ¢¾²ÏîÑŰɽ§Í¬ÏįÏįÏİÐÅ±ÑÆ²ÑƱÑDzÑDzÓȳÔɵÕʵÕʵðíåÕ˵Õ˶ÕË·ÕÌ·ÖÌ·ÕÌ·ÖÌ·×͸×͸ØÎºÙϺÙϺÚϺÚϺÚÑ»ÜÑ»ÞÒ¼ÞÓ½ßÔ¾àÕ¿ÞÔ¿À¸¦º±¡»³£Á¹ªÁ¹ª¿¶©»´¦¹°£µ® ²«°©›°©²«ž·¯£»µ©Â»°ÆÀ´Å¿³Á»°¼¶«²­¢¨£™žš˜”Š’Ž„‘Œƒ‹‚Ї~ˆ…|…‚zƒ€yƒy€~w}ztxwpvtossmqqlpqmnollokknkhlifkjejiciibgf`ee`dd]a_^a_egf_b`SUT[\ZjlidecPQOLMK_a^qqoefcKLJ<><JKIdecwwwpnqZZ[?@B345124ACEUXYhlmuzzz€È¿¶Ç¾³À¶ª½³§·¬Ÿ¬¡“¡•…“†w…xi€sd‰|l™Œ|·©šÎÁ±Ù̼˾®²¥–˜‹|š}³¥–ÒÅ¶ÔÆ·¹«¢”„¬žŽË½­Ñ²»¬›¯¡Å¶¥Öǵȼ¨À´ŸÍ®ÓdzÌÀ«ÎÂ­ÒÆ±ÒÆ±ÑÆ²ÒdzÔɶÕʶÕʶÕÊ·ÕÊ·Ö˸Ö˸×Ì·ØÍ¸ñíæ×͸Ö͹×ͺØÏ»ØÏ»ØÏ»ØÏ»ØÏ¼ÙмÙмÛѾÛÒ¾ÚѽÚѽÛÒ¾ÝÓ¿ßÔÁâ×ÃãØÄâØÅà×ùª½µ¦¼´¦Ã»­Ã¼¯Âº­¾·ªº³¦·°¤³¬ ²«Ÿ±ªž²« ·°¥»µªÂ¼±ÇÁ¶ÆÁ¶Ã½³½·¬³®¤©¤šŸ›‘™•Œ”‘‡”‘ˆ’‡Ž‹‚‰†~…ƒ{ƒyx€~w}{tzxrwvqttossorsppronqnknmjmkglkejkdijbhhbfgbfe_dc[_^^a`dge]`_RUS[^[ikheieRTQILHX[XknjjmiSUS?A?=@=RRRkjlvuxnnpXY[CDF468.12367?DEMRSŸ—ž–š‘‰Ž…{‚zp}sh{reugŽƒu£–‡»®ÐòÖȸ̿¯µ¨˜Ÿ’‚˜‹|§š‹Æ¹ªØË½Î³³¦˜¥˜‰¶©šÒĵÐô¹«œ°¢”Ƹ¨ÕÇ·É»ªÀ´¡Ïð×̸ÑÅ±ÒÆ±Öʵ×˶ÖʶÕÊ·Ö˸×̹×̹×͹×͹ØÍºØÎ»ØÎ¼ÙϼÙмòîçÙнÙѾÙÑ¿ÚÑ¿ÚÑ¿ÙÑ¿ÙÑ¿ÙѾÚÑ¿ÛÒÀÜÓÁÝÔÁÜÓÁÜÓÁÝÔÂÞÖÄáØÅäÚÇåÛÈãÚÈâÙÇž¯¿¸ª¾·ªÄ¾±ÇÀ³Å¾²Á»®¾¶«º²§·°¥´­¢³¬¡³¬¢·±§»µ«À»±ÇÀ·ÆÁ¸Ä¾µ½·¯´®¦ª¥¡œ”›—Ž–’Š•‘Š“‰‹„‹ˆ‡„~„|‚y|w|{v{yuxwswvstuqturrsqoromomknmimlfllejldiichhbgg`dd^cb[__\a`cge]a`SWTX\YfkhiliUXUFJFNROdgdmqo^b_HLJ:<<@ABTTWjkmtvwmprbdgNQR;?A.13)-/€ysƒ{u…~wކ–ˆŸ—¦Ÿ•³«ŸÃ¹¬ÍÁ´ÏÁ´Á´¥®¡’‘‚™Œ|¦™‰¿³£ÔȸÔǸ¿³¤ªŽ«ŸÁµ¦ÖɺÎÀ³¸«´§™Ê½¯Õȹɻ­Â´¤Ï±ÙÌ»ÔÉ·ÕÉ·ÚλÚκÙͺØÍ¹ØÍºÙλÙμÙϼÙϼÙнÚпÚÑÀÛÒÁÛÓÁÛÓÂòïéÜÓÂÜÔÂÛÓÂÜÔÃÛÔÃÛÔÂÛÓÂÛÓÂÛÓÂÜÔÃÝÕÄÝÕÄÞÕÄÞÖÅß×ÆàØÆàØÇáÙÈáÙÈáÙÈàØÈÅ¿±Â»®¿¹¬Å¾±ÇÁ´Æ¿´Á»°½·¬º´©·±§µ¯¥³¬£´­¥¸±¨º´«À¹±Ä½¶Ä¿¸Ã½¶¾·±µ°©¬¦Ÿ¤ž—›––‘‹“މ‹‡Ž‰…‹†‚ˆƒ†~„€|€~z}}y{zwzyvyxvvvtuusstrrrqpqononknminmgllfkjeiibggaef_dd]ccZ__\bcchhaedTWVUYXcffhllZ]\GJJGJIX\[imleiiW[[AEF7:<=ABOSTademqrqwwkpq]cdOUV¯¨¢²«¥¹²¬¿¸²Å¿¸ÍÇ¿ÑÊÃËż¼³ª­¤™Ÿ”ˆ•Š}–Š|¥™‹½°¢ÓÆ·Öɺǻ¬³¦˜¦šŒ³¨šÌÀ²ØÌ¾É½°¸¬Ÿ»¯¢ÏöÖɼȼ¯Â¶¨Ï´×Ë»ÔȸÖʺÜпÜоÛϾÚϽÛоÜÑ¿ÜÒÀÝÒÁÝÓÁÜÓÂÝÓÃÝÔÅÞÖÆÞ×Çß×Èß×Èôñëßׯß×Çß×Çß×Çß×Èß×Èß×Èß×Èß×Èß×Çß×ÈߨÈàØÉàÙÉáÚÊáÚÊáÚÊâÚËâÚËâÚÌâÚÌÇÀ´Ã½²Á»°Ä¾´ÇÀ¶Å¿µÂ¼²¾¹¯»¶¬¹³ª¶¯§µ®§¶¯¨¸³«¼µ¯¿¹³Ã½·Ã¾¸Ã¾¸¾¹´·±¬®©£¥ šž™“˜“ޓދ‘‹ˆŠ†Œ‡„Š…‚‡‚€…€~}~~{}}{|{yzyxxxvwvuuusssrrrqppomookooimmgllfkkdiibhg`ef_ee^dd[bb]bbeiiaeeVYYRVV^bagkk_ccNQPCGFKOO\__imnejkTYYBFG6;<8=>BGHQVX`egjppmstȼÆÀ»Å¾¹Â»µº³®´­¦©£œ£– ™’š’Šœ”‹¨Ÿ”½³¨ÎÄ·Ôɻȼ¯µª›¨œ­¡“Áµ¨ÓÈ»ÓȺÁµ©¶«žÂ¶©ÓÈ»ÕɽǼ¯Æº­Òƹ×˾ÓǹÔȹÚοÛÐÀÛÐÀÜÐÁÝÒÂÞÔÃàÕÅàÖÅàÖÆà×Çß×Èà×ÉáØÊáÚËâÚÍâÛÍâÛÍõòíâÚÊâÚÊâÚËâÚÌâÛÍáÛÍáÛÍâÛÍáÚÌáÚÌáÚÌâÛÌâÛÍäÜÎäÝÏäÝÏäÜÏäÝÐäÝÐäÝÑäÞÑÊĹſ´Á¼²Ä¾´ÇÁ¸È¸Ŀ¶À¼²¾¹¯»µ­¸²ª¶°©¶°©º³­¼¶°¿º³Â½¶Ã¾¸Â½¸¿ºµ¸³®°«§©¤Ÿ¢œ˜š•’•’ŠŠˆ‰‡‹†…ˆ„‚†‚ƒ~}}}||{zzzxxwvvuttusssrqqqnqplpojnnhlmgklejjdiibgg`fg`ef_de\ab]aacggcffX\\OSSVZZcggehhVZYFJIBFELPP]abgllfkkY^`GLM:?@49;3899?@DIK¦ š¤ž˜Ÿ™“›”š”Ž™“Œ›•¤˜±«¥Ä½·ÓÌÅÖÐÇÎÆ½À¸¯¯¦œ¦œ« “¼±¥ÑƹÕ˽ËÀ³»°£¹¯£ÊÀ³×ÍÀÓȽǼ°É¾²ÖʾØÍÂÔɽÖʾÙÎÂÚÐÃÛÑÄÝÓÅßÔÆá×ÈãÙÊäÚËãÚËãÚËâÚÌâÛÍãÛÍãÜÏäÝÏäÝÐåÝÐåÝÐöóîæÞÏåÞÐäÝÏäÝÏäÝÐãÝÐäÝÑäÝÐäÝÐäÞÑäÞÑåßÑæßÓæàÔæàÔæàÔæáÔçáÕèáÖèáÖçáÖËǼÆÁ¸Ä¿µÄ¿¶ÉÄ»ÊżÇúĿ·¿»³½¸°ºµ®¸²¬¸´­ºµ¯»·±¾º´Á½·Â½¸Â½¸À»¶ºµ±³®«¬§¤¤Ÿœ˜–—’“ŽŒ‘ŒŠŠˆ‹‡…‰…„‡„‚„‚ƒ€€€~}|}|z{yyyxwwvvttsssrprqmqqlpojnnhmlfkkdjidiibhhbggaffaff_cc\`aaeecgg\`aQTTPTT[__dgg`ddQTTCGI@EFJOPW]^dijgln`fgTZ[FLM7=>.45£¢­¤£¯§¦±­¬·²²º½¼ÄÄÄÌÌËÔÐÏØÎÎÕÇÅÌ¿½Á±¯²¨¦©¬ª­»¸ºÌÉÌÓÐÓÌÈ˾»½¸µ¶Â¿¿ÒÎÎÖÔÒÎÊÊÆÀÁÌÈÈÕÑÒÕÑÒÒÍÎÔÏÏÖÒÏÖÒÐ×ÓÐØÓÑÙÕÒÙÖÒÚ×ÔÛØÖÛØÕÛØÖÜÙ×ÜÙ×ÜÙÖÝØÕÞÚÔÞÚÕÞÚÕÞÚÕÞÚÕóòðßÚÕßÚÕÞÚÔÞÚÔÝÙÕÝÙÕÞÙÔÞÚÓÞÚÓÞÚÔÞÚÔÞÚÔßÛÕáÛÕàÚÔàÚÔßÚÓßÙÔßÙÔßÙÓàØÔÆ¿¼Â¼¹À¹¶À¹µÄ¾ºÅÁ¼Ã¿ºÀ¼·¼¸´¹´±·²®´¯­³­®´®¯¶¯¯¹²²¼µµ¾¶¶¿·µ½¶²¶±­¯ª¨§£¢žœœ—••’ŒŽˆ‰Œ…‡‰‚„†ƒ}€|}€|}||~zz}yx}ww{vu{vuzuswsruqptqoqpnoolmmjlkijjhgigefededbddbddacc_aa_``]__YZZ[^]`ca]`_TVULONQTR\^]bfd]baNTTBFF?DDCHHNSS\abdiibgg^ccSYYÅÉÝÉÌàÉÌàÊÍáËÎàÈËÜÅÈÚ½ÁÑ´·È¬°Á§«»¨«·³µÁÁÄÐÌÏÜÏÓßÈÊ×¾¿Ì··Ä½½ÈÊËÕÔÕÞÑÓÙÈÉÏÈÇÏÐÏ×ÖÕÝÔÓÛÒÑÙÔÓÛÖÕÛÖÕØÖÕØÖÖÙ×ÖÚ×ÖÚ×ÖÚ×ÖÚ×ÖÚ×ÖÚØ×ÛØØÜØØÜØØÛÚØÙÚØØÚØØÚØØÚØØÚØØòññÚØØÚØØÚØØÚרÚרÚרÚ×ÖÚ×ÕÚ×ÕÚ×ÕÚ×ÕÚ×ÕÚ×ÕÛÖÓÛÖÓÛÖÓÚÕÑÚÕÑÚÕÑÚÕÑÛÔÑýº¿¹¶½·´»µ³¿¹·Â½»À¼¹½º·¹¶³¶²¯³®¬¯«©®ªª®©ª°ª«´¬­¸®°º°²»²²¹²±³®¯«©¬ ¡§–™¡‘š…ˆ”€Žz|‰uvƒrspp~mo{lpympympxopxqqwrrxusuurqtqpsonsnmqmkominiemidkhdifcgebdcacc`ba_``^__]^_]]]\Z[ZWXVVXU\][_`_Y[YNPNKMKORP[]\aed]a`SWVFJJ>BB<@@@EEGLLMRRSYY¸»Ð´¹Ì²µÊ¯³Æ«¯Á¦ª½£¦¹¢¦¹¥¨¼ª­Áµ¹ËÀÄÔÈÍÜÇÌÜ¿ÃÔ´¸É°µÅ´¶ÆÁÂÏÌÌÙÍÎÙÅÇÑÁÂËÆÇÎÍÍÕÑÏØÎÍÖÏÎ×ÑÐÙÓÑÚÓÒÙÓÓÖÔÓ×ÕÕØÕÕØÕÕØÕÕØÕÕ×ÕÕ×ÕÕ×ÕÕ×ÕÕ×ÕÕ×ÖÕ××ÕÖ×ÕÕ×ÕÕ×ÕÕ×ÕÕ×ÕÕñðð×ÕÕ×ÕÕ×ÕÕÖÓÔÖÓÔÖÓÔ×ÔÓ×ÕÓ×ÕÓ×ÔÒÖÓÑÖÓÑ×ÓÑÙÕÐÚÕÐÚÕÐÙÔÐØÓÏØÓÏÙÓÎÚÓͼ¶¿¹³¼¶±º³®»µ±¾¹¶½¹¶º¶³·³°µ°­°«©­¨¥«¨Ÿ«§ ©¦¢¬©§¯¬®±¯²¯®¶¨©µž ¯”¤€ˆšt}‘hs‰]l†Ud€P`{M]yKZuIXsHVqFVnGWnHVmIVkKWkLXkRZhY]g^`iabjggnjjnijlihgigehecgdafc`ea^b`\a_\_]Z]]Z\\Z[[ZYZYYZWUWTTURVWV[\Z[\ZTVTJMJHJHJNMTXV\__]a`X\[OSSEII;?>5:9499¢¨»£©½£¨¼¥ª¾§¬Á¬±Æ³·Ì¸»Ñ¼¿Õ¿ÃÙ½ÂÖ¸¾Ñ®µÈ©¯Â¥«¾«±Åµ¼Ï¿ÂÔÁÁѼ½Ë¸¹Å»¼ÆÂÃÌÈÉÐÉÈÒÉÇÑÌÊÔÌÊÔÌÊÓÌËÕÎÌÔÏÏÒÑÐÓÒÑÕÒÑÕÒÑÕÒÑÕÒÒÒÒÒÑÒÒÑÒÒÑÒÒÑÒÒÑÒÒÑÔÑÒÔÑÒÔÑÒÔÑÒÔÑÒÔÑÒðïïÔÑÒÔÑÒÔÑÒÓÏÐÒÏÐÒÏÐÓÐÏÓÐÎÓÐÎÒÏÍÒÏÌÒÏÌÒÏÌÕÐÌÕÐÌÕÐÌÖÑÌÖÑÌÖÑÌ×ÐÊØÐÈÁº³½¶¯º³­¸²«·±ª»¶±¼·³¹µ±¶²®²®ª¯ª§¬¦¢©¤¨¥¡¤¤§ «”𬉑¨}‰¥t‚¥p} jy›es•_nYiŠPc†K_‚G[~DWzAUw?Qt>Qr=Qs<Pp=No>Ml=Lj=Jg=Kf=Ke?LcALaEM`IPaOVcV[b]`ccdeddceb_e`\c^Z`]Z_\Y\ZW[ZXYYWXXWVWTUVSUVSRSPQROTURXYWXZVQSQILJEGEEIHMPOTXW]`_\a`W[[PTSGLK¸¼Ñ¹¾Ò»¾Ó¼ÀÔ¿ÃØ¿ÃÙ½ÂØ»¿Ó´¸Í¯´È©­Â¦«¿¨­Á­²Æ´¹Î¹½Óº½Ò´µÊ®°Ã¯°Âµ¶Ç¹»Ì¹¼Ë·ºÈ¼¼Ê¿½ËÀ¿ÍÀ¿ÍÀ¾ÌÁ¿ÎÃÂÎÈÈÏËËÐÍÍÒÍÎÑÍÎÑÎÏÑÎÎÎÍÍËÌÌËÌÌËÎÎÌÎÎÌÎÍÌÐÍÏÐÍÐÐÍÐÐÌÏÐÌÏÐÌÏîíîÐÍÎÐÌÍÐÌÍÏËÌÏËÌÎËËÌÉÈËÈÆËÈÆÊÆÅÉÆÄÉÆÄÊÆÅËÆÆËÆÆËÆÆËÇÇÌÇÇÌÇÇÎÆÅÐÆÂ¹±¯´¯­²®¬¯«©®ª¨´®ª¸°¬µ¯ª±­©®©¨«¦¨¤¢©™©Š‘¡u~–fs’_n•^o›`v¢bx¦bw¥]ržXl—SfN`‰GY€DV{BSx?Pt=Mr;Ko:In9Io8Im9Hl:Gj:Fh9Ef7Fh4Fh4De4Cb5A^5B\6CZ9EV=GUGMXQU[[[]_]\`\Z^ZW]YV[XUZXVYWUXVTVURUTQTTQTURRSOOPKNOJRSOUWUWYXSVSJMKCFD@CBCFDHLKLOOOTSRVU¶¹Ï¶¹Îµ¸Í²µÉ¯³Å­±Áª­¾©­¾©­¾¬°Á°³Å¸¹Ì¼½Ð½½Ñ¹ºÍµµÉ°±Å¯²Ç°´Ì´¸Ð´¸Ñ²·Ï°¶Î°´Ë²´È´µÈ¶¶É¶·Ê¶·Ê¶·Ê··È¸ºÆ½¿ÈÀÃÊÄÇËÆÉËÇÊËÈÈÈÇÇÅÆÆÄÆÆÄÈÈÆÈÈÆÈÈÈËÈËÌÈÍÌÈÍËÇÌÊÆËÊÆËìëìÉÆÈÈÅÆÈÄÅÈÄÅÇÃÄÆÂÃÅÁÂÄÀÁ¿ÀÁ½¿À¼¾À¼¾À¼ÀÀ¼ÂÀ¼ÂÀ¼ÂÀ¼ÂÀ¼ÂÀ¼Â»Àĺ¾®¨¬©¦ª§¥©¦£§¦¢¥­£¦²¨§²«¦¬©¨¦§¯—š¬y‚ŸZr–KeŒHbŒMf’Ng–Pi˜SkšUmšTl˜Qh•NeI`‹EZ…AU=Pz;Mw7Ir4Fn2Dl2Cj2Bi1Ah1Ag0@f0?e0?c1?b2?a2>`2>_/;]-;Y+:X,;Y.=X1=T5?P;COCJRORVZWX[WVZWUYVTXVSWUQWUOVSNTRPSRPRRORRLPQIMNHLMJNPMQTQSVSRURNPNILIDGD=@>;=<;?<§«Â¨«Â§ªÁ¨¬Áª¯Â¬±Ã®³Å³·É·»Í¸½Ï¹½Ï¹ºÌ¶·É³´Ç²³Æµ¶Ç¸¹Ë·ºÍµ¹Î´¸Î´¸Î³¸Í±¶Ì±´Ê±²Ç±±Å°±Ä±±Å±±Å±±Å±²Ä²´Ãµ·Ã·ºÃº½Ä¼¿Ä½ÁÄ¿ÀÁÀÀÀÁÁÂÂÂÂÃÂÃÃÂÃÃÂÄÄÀÅÅÀÆÅÀÆÅÀÆÆÁÇÆÁÇëéêÿÁ¾¿Á½¾Á½¾À¼½¿»¼¾¹¾½·¿»¶¾»µ½»¶½»¶¾»¶½»¶º¼¶º¼¶º¼¶º¼¶º¼¶º¼¶º½¶º«£¦©Ÿ¡¨¦››¤™š¤¢¦¢«£¦¯™§q€šSfŠH_ŠC_B_B]ŽB^ŽB]B]E`‘Ic“Jc“Ib‘F_ŽC\‰?V„;Q~7Ly5Iu1Eq.Al,>j+>h+=g+=f+<d*:c):a)9a*9_+9]+9]+9\+8[)7Y'7V$6T"4Q&6P(5N-8N09N4;L=?MJJTUTYXWWXURXUNWTLUSKTRLTRNSQNQOKPOIPOJNOJJKGHJFGIFJMIMOLSTQRTPMOLGJGBDB«¯È¬°È­°É®²É±¶Ê²·Ë²·Ê²·Ê²¶Ê°µÈ°´Æ²´Äµ·Æ¸¹Ê¹»Ì¹ºË¹ºË¸ºË¸¹Ê¸¹Ê¸ºË¸ºË·¸Éµ·È´µÆ²³Ä¯°Á­¯À­®¿­¯À®¯Á®°Â¯±Á°²¿²µ¿´·¾¶¹¿¸¹¾º¹¾¼¼Á¾½Â¾½Â¾½Â¾½Â¿»Á¿ºÀ¿ºÀÀ»ÁÀ»ÁÀ»Áéç龿¾¿Â¾¿Á½¾À¼½¿»¼¾¹¿½¸Á¼·À¼¶À½·Á½·Á½·¿¿·¸À·¶À·¶À·¶À·¶À·¶½¸¹»¸º®¥¢®Ÿ›«›˜§™š¤š š›¬‰“«jz—MdŠCa>a—=`™<Z‘;X8UŠ6Sˆ7Sˆ:VŠ>ZC^E`‘E_D]ŽAZŠ<U…8O~4Ix0Et-Bp+@m)>k(<i(<g(;f':e&8c%8a%7`&6^&6\&4Z&4Y&4Y%5X%5W!5T2P0O0P"0Q%2R*5S-5Q06K8<JFJPSSRWUNVTLVTKTRKSPKSOKRMJQLIPLHMMFLLGKKFHIDEGCEF@FGAIJCJKEJLFJMG¬°Ê®²Ë®²Ë­²Ê¯´Ê¯´È¯´È¯´È¯´Ç¯´È±¶È·¹Ç¹»É¼¾Ì½¿Ì½¿Ì½¿Í¾¾Ê¿½É¿½É¿¾É¿¾É¾¼È¼»Ç¸¹Çµ·Ä±³Á°²¿¯±¿¯±¾®°À®¯Ä®¯Ã®°Á±³Á³µÀ´·À··À¹¸À»ºÁ½»Ã½¼Ä½¼Ä¾¼Ã¿ºÁ¿ºÀ¿ºÀ¿ºÀ¿ºÀ¿ºÀéçèÁ½¾Ã¿ÀÄÀÁÄÀÁÄÀÁÄÀÁþÁ½À½À½À½À½Àý¾Æ½·Ç¼¶Ç¼¶Ç¼¶Ç¼¶Ç¼¶Ã¾º¿¾»²¨£²£­Ÿ¡£ž«•¬h{œJb‹D_Ec›Ce¡<aŸ8^š:W”9V’9U7SŠ7Tˆ9Vˆ>YŒB]E_‘E_E_C\Œ>W‡:P5Kz1Fu-Bp,An+?l)=j';g';f':e&8c&8a%7`%5^&5\&4[&4Y&4Y%4X$4W"4T!3R 1R/Q-Q-R"/T'4T+7Q-7K.6C8=DINPVWVWUQVTNURJVPIVNITMIQMHNLGLLEKJEKKELLGMMFNMELKCHH@DE?CD=°´Î²¶Ï²¶Ï²¶Ï³¸Í³¸Ì³¸Ì´¹Í´¹Í´¹ÍµºË¹»Ç¹»Çº¼Ç¼¾Ê¾ÁÌÁÃÏÅÄÍÆÃÊÆÃÊÆÃÊÄÂÉÃÀÇÁ¿Ç¾¿Ê»½È·ºÅ¶¸Ä´·Â²´¿°²Á°°Ç°±Ç°±Å±³Ã³µÂ´·Â··Â¹¸Â»¹Ä¼ºÅ»ºÄ»ºÄ¼ºÃ¿ºÁ¿ºÀ¿ºÀ¿ºÀ¿ºÀ¿ºÀèçè¿»¼Á½¾Â¾¿Â¾¿ÄÀÁÇÃÃÈÅÀȞȞȞȞȞɎÎùϹϹϹϹϹÊļÆÅ½¸®¦¸«¦ª¥®‰¤Lf4Xˆ6\‘@c¡Dd¨Bb¥?_›<[–:W˜:V–9U’9UŽ:V‹;WŠ>ZŒA]C^D_‘D^C\?Yˆ;R‚7M}2Hw.Cr-Bo,@n)=k(;g';f':e&9d&8b%7a%6^&5\&5[&5Z&4Y%5Y%4Y&4V&3U&3U#1T"1S!.R,M-J$1K)6M*7J(5F,7F?CLTSUXVSXTKXSHYQGWOHSNHQMHOLGNKFOLGOLGOLFOKCOMDNLDLJCIG@µ¹ÑµºÑµºÑµºÑµ¹Î¶¹Í¶¹Í·ºÎ¸»Ï¸»Ï¹»Í¼½È¼¼Ç»¼ÇººÅ½½ÈÁÁÌÆÅÌÉÈÌÊÉÌÊÉÌÈÇÊÇÆÉÆÅÈÂÃÈ¿Àǽ¾Å»»Ä¸¹Ã¶¶Á´´Ã³²Æ³²Ä²±Ã´³ÃµµÄ··Ä¸·Á¹¸¿º¸Àº¹À¹¸À¹¸Àº¸À½¹À¾¹À¾¹À¿ºÀ¿ºÁ¿ºÁèæè½¸½¿º¿À»¾¾º»À¼¼Ã¿¾ÈþËÅ½ÌÆ½ÍƼÍÇ»ÍÇ»ÎǹÒǶÒǶÐǹÏÇ»ÏÇ»ÐÇºÒÆ¸ÒŹº´³£§¶j{œA\Œ8Z’6[”9]—?`ŸCb¢C`žB_˜B]•>Z—<X•;V‘<W<W=XŒ?YA[ŽB\C\C\ŽC[@X‰>U…9O€5Jy1Ft.Cq,Ao*>l(<i';f&:e&9d%8b$6a$5_%5]%5]%4\$4[$4Z$4Y&4W&4W&4W%2U$1T"0R.M,I,G-G#2J'5M&4K+2E7:DLMMWUMYSH\QH[OHWNIUMITLHSKGRKFQKDPJCPIBOIBLF@ID>GC=¶»Ð·¼Ñ·¼Ñ·¼Ð¹»Í¹»Ì¹»Ì»¼Î¼¾Ï¼¾Ï¾¾ÍÁÀÉÁÀÉÁ¿È½¼Å¾½ÆÁÀÈÆÆÉËËÉÌÌËÍÍÌÌÍËÌÍËÌÌËÉÉÇÇÇÆÅÅÆÂÁÅ¿¾Å½¼Å»¹Å¸¶Ä¶´Âµ³Á·µÃ¹·Å»¸Æ»¹Âº¹¾º¹¾º¹¾º¹¾º¹¾º¹¾¼¸¾¼·¾¼·¾½¸¿½¸¿½¸¿èæè½¸À¿¹ÀÀ»¿À¼¼Á½»Ã¿»ÉÀ¾ÍÁ¿ÎþÏŽÏÅ»ÏÆ¹ÐƶÑȱÐȳÏȶÏȸÏȹÑǸÕÅ¸ÔÆÂ˜Ÿ¯Tn–7]•8]š=]š?]—=[•A^˜EcœFb›EašD_—C^•A\“@Z‘?Z@Y?Y@YŽAZŽBZŽBZD[ŽD[CZ‹@V‡;Q‚6L{2Gv/Ds-Ap*?m)=j';g&9e&9d$7b#6`$6`%7`%7_$6^$5]"4["4Z#3X$3W$3V$3V$2U"1S 0Q.N,J)F*E"/I'4M(3J)2C06>DEDWRM]RM\OJ[OIXMGXLGWKFVLEUKCSJCQHCPGCLD@JB>IB=¸¾Ð¹¾Ñ¹¾Ñ¹¿Ï¼ÀɽÀǽÀÇÀÃÊÂÆÌÂÆÌÄÆËÇÇÉÇÇÈÇÇÈÉÈÊÉÉÊÉÉÊËËÇÌÎÆÎÏÈÏÐÉÎÏÈÎÏÈÎÏÈÎÏÆÍÎÅËÌÅÉÊÆÆÆÆÂÁþ½Ã»ºÅº¸Å¹·Ã¹·Ä»¹Æ¼ºÇ¾½Ä¾½Â¾½Â¾½Â¾½Â¾½Â¾½ÂÀ¼ÁÀ»ÁÀ»ÁÀ»À¿ºÀ¿ºÀèç鿺ÀÁ¼À¾¿ÄÀ¾Å¾ÇþËþÏÄ¿ÐÆ¾ÑǽÑÇ»ÑȹÑÉ·ÏÉ´ÐɳÒÇ³ÔÆ´ÔÆ¶ÔÆ¹ÉÅÇ”¡¹Ng‹;`’6_š;`œ?^˜@]˜?]—@^˜FcIfŸIežHcœE`˜C^•A\“B\’A[‘AZAZB[BZŽC[ŽD\ŽE\ŽD[Œ@Vˆ;Rƒ7M}3Hw0Et-Bp+?n)=k(<h&:f&9d%7c#7a%8b&8a&7`%7_$5]"4[!3Y#3X#3W#2V$3V#2U"0S 0Q/O-L+H)D)D$0J'5I(5E*2C/2A?>FTPPXSL[RHZQF[OEZNEYMFYLFWKFTJDSHCOE@LC>KB<¼ÂѼÂѼÂѼÂÐÀÄÈÁÅÅÁÅÅÃÇÇÅÊÊÅÉÊÇÊÉËÌÈËÌÈËÌÈÌÍÉÌÍÈËÌÈÍÎÇÎÏÇÏÐÈÏÐÈÎÏÇÎÏÇÎÏÆÍÏÂÍÏÁÌÎÂËÍÅÉÊÆÆÆÄÃÃÅÁÀÈ¿¾Ç¾¼Æ¼»Ä¼»Ä¿½ÆÁÀÆÂÁÆÃÂÇÃÂÇÂÁÆÂÁÇÃÂÆÆÂÃÆÂÃÆÂÃÆÁÂÅÁÂÅÁÂêééþÁ¾¾Â¾¼Å½ÇĽɯ¼ÎƾÒÇ¿ÓÉ¿Ô˽Ô˺Ô˸ÓÌ·ÐÌ·ÓË´×ɳ×Ç·ÖÉÂÉÂņ“­Gkž:b˜7bž8aŸ=`?^—@^™A_š@_™FdKh¡Lh¢JgŸGc›Fa˜D^–D^”B\’@Z@YŽ@X@YBZŽD\E\ŽCZŒ@W‰<Rƒ8N~4Jz0Fu-Bq-Ao+?m*=k(;h(;g':f'9d&9c&8b&7a%7`$5]"4\!3Z"3Y#3X#2V#2V#2U#2U 0R/P.N-K,H+F -F$3F(7H)4K+2K-0C9=COQNZWM[SH\RF]RF\OG\NIZLHXKEVKDRGAOD>MC<ÀÆÒÁÈÔÁÈÔÂÈÓÄÉÍÅÉÊÅÉÊÆÊËÆÊËÆÊËÈÊÌÌÌÍÌÌÍÌÌÍÌÌÍÌÌÍÌÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÌÌÍÆÌÍÅÌÍÇÍÍÊÌÌÌËÊÌÈÈÌÆÅÊÄÃÉÃÂÇÁÀŽ¼Â½¼ÂÀ¿ÄÂÁÆÄÃÈÅÄÉÄÃÈÄÃÈÅÄÇÇÄÂÇÃÁÇÃÁÇÃÁÇÄÁÇÄÁëêéÇÃÁÅÁ¿Å½ÈżÉǼËɼÑʾÕËÀÖÍ¿ØÏ¾ÙѽÙÑ»ØÑºÖÒ»ÚѹÝϺÙÎÆÃÅÑ}ެGh›>i¬:c¡;b <bŸ>aœ@a›B`œB`œCa›FdžKh¢Nj£Mi¢IežHc›Gb™E_–B]“@Z?XŽ?X@XŒAYŽBZŽCZAX‹@Wˆ=S…:P€6L}3Ix0Et.Dr-Ao+?l)=j)=i(<h(;f&9c%8b%8a%6`$6^#5]!4[#3Y#3X"2V"2U"1U"1T 0R/P/O.L!0M!/J".H$1G(5I+6M,6L+3F*2?6<CQOO^XR]TJ^TH^RH]OJ[NIYNFXMETJBRH@OF>»Â̽ÄͽÄͽÄÍÀÄÊÁÄÊÀÄÊÁÄËÂÅËÂÅËÃÅÌÅÄÍÅÄÍÅÄÍÅÄÍÅÄÍÅÄÎÅÃÍÄÃÍÄÃÍÄÃÍÄÃÍÄÃÍÄÃËÅÅÆÅÆÅÅÅÇÅÄÉÃÂÊÂÀÊÂÀÉÃÂÇÁÁÅÀÀÄÀ¿Ã½½Á¾½Á¿¾ÃÀ¿ÄÂÁÆÃÂÇÄÃÈÄÃÈÅÄÇÇÄÁÇÄ¿ÇÄ¿ÇÄ¿ÇÄ¿ÇÄ¿ëêéÈÅÁÊÇÂËÈÁÌÉ¿Í˾Ï;ÔÍ¿×Í¿ØÏ¿ÚÒ¾ÚÒ¼ÚÓºÚÓ¹ÙÔ¸ÜÒ¹ÞÑÁËÉÌzŽ­>i¢=k±Ci°Ac¢BcŸAcžAdŸ@d BcŸDcŸEcFdKh¢Ok¥Nk¤Lg KfžIdœGb™D_•B\’@Z@YŽ@YŽAYAZAYŒ@X‹@W‰=T†;Q‚8N6L{2Gw0Et.Cq,An*?l*>k)<i(;g&9d&8c&8b%7a$6_#6^"5\"3Z#3X"2W"2V"1U!0T 0S0Q/O.M!/L$0M$0L&/L)1J-5H.8E-6C*3C*0B;8CTNP]VP^UI^TH^PJ]OI[QFZPFVMBSJAQH?¹ÁϺÁиÀÏ·¿Í¶½Ì¶¼Ë¶¼Ë·½Ì·½Ì·½Ì¸½Ìº½Ìº½Ë»½Ë»½Ì»½Ì»½Ì¾½Ê¿½É¿¼È¿¼È¿¼È¿¼È¿¼È¾¿Ä½¿Ã½¿Ä¾¿Å¾¿Ç½¾Æ¾¾ÅÀ¿Ã¿¾Â½½Á¾½Á¾¾Á¿¿ÃÁÀÅÁÀÆÂÁÆÃÂÈÅÄÉÆÅÊÆÅÊÅÅÃÅÅÁÅÅÁÅÅÁÅÅÁÅÅÁëëéÉÆÂÌÉÃÎËÁÏÍ¿ÏμÐλØÎºÜμÜοÚÏÀØÎÀØÐÀÙÓ¹ÝÖ°ÖÖÀ¾ËÐsŽ®Ek ?k«Ak¯Fj¯Dc£Ed¡Ee¢Ef¢Ce¡DdŸDcDcœEcœIgŸNk£Pm¤Oj¡NhŸMfœKcšHa–E^’C\BZAYAXŒAXŠAWŠ@Wˆ@V‡?U…=Rƒ<Q€8M|5Iw2Ft0Dq.Ao,?k*=j+<h*<g);g(9f)9f(9d'8c&7a%7`%6]$4[#4Z$4Y#3W"2V 0S 0R /P-M!-K#/L&1M(1L+3L,5G.7E08E.4D)/A+/>8:CQQQ\WP^UK_SH_SI]SI[RHWOFTLCPI@¶¾Ñ¶¾Ñµ½Ð´¼Ï´¼Ï´¼Ï´¼Ï´¼Ï³»Ï³»Ï´¼Î·½Î·¾Î·½Î¸¾ÎºÀнÃÓÄÅÏÈÅÌÉÆÍÈÆÍÆÄËÆÄËÆÄÊÃÆÈÂÆÇÂÆÇÂÆÇÂÆÇÂÆÇÅÇÉÉÈÍÇÆËÆÅÊÄÃÈÄÃÈÄÃÈÄÃÈÄÃÉÄÃÈÄÃÉÅÄÊÇÆÌÈÇÌÆÈÅÆÈÃÆÈÃÆÈÃÆÈÃÆÈÃëëéÇÄÁÈÅÀÊÇ¿ÎÌÀÏξÐνØÏ½ÜξÛÎÁÙÍÁØÍÁÙÏÂÛÒ¾ÝØ¸ÉÔÌy™¶?k¤>j®Ek¬Hk¬Hk¯Df¥Ef¥Hh¦Hg¦Gf£Fe FdœEc›Ec›GeœLi Ql£Sl¢Qj¡PhžNf›Lc˜H_“F]‘E[ŽDZBX‹BXŠAV‡AV†?T„?Sƒ>S‚=Q:N|7Jx5Hu3Fs1Dp/Am,?j,>h,=h,=i,<j+<i,;h*:f):e)9d(9a'8^&6]&6\%6[$4Y"1U"0T#1S"0P".M".J".J%1J)4K+5J,5H07G17F.4B(0?)1=;?DSRP]WO_UI_TH]TJ\SJXPGTMDQJB²ºÍ²ºÍ³»Î´¼Ï´¼Ï´¼Ï´¼Ïµ½Ðµ½Ñµ½Ð·¾Ð¹¿Ð¹¿Ï¹¿ÐºÀлÁѾÃÓÃÆÍÇÈÉËËÌÌÌÎÊËÌÊËÌÊËËÈÌÈÇÌÈÇÌÈÇÌÈÇÌÈÇÌÈÉÌÊËÊÏÉÈÍÈÇÌÇÆËÇÆËÇÆËÆÅÊÅÅÉÅÅÉÅÄÈÅÄÈÇÆÊÈÈÊËËÇÌËÆÌËÆÌËÆÌËÆÌËÆíìëÊÆÅÈÄÃÈÄÁÌÈÃÏÌÅÒÏÇÔÐÉÕÐÈ×ÐÄ×ÏÀØÎ¾ÛοÜÑÅÑÕÓŒž²Jjš@h­?i´Dj±Hk°Jm±Fh¨Gi¨Jj©Jj§Ih¥Hg¢GfŸGeFdœFd›IfOk£Un¥Tm£Rk PhžNfšJb–H_“F]‘E\BYŒBXŠAWˆ@V‡>T…>S‚>R=Q€;O}8Kz6Iw4Hu2Fr0Co.Am-@k-@k-@l,?l,?k,?j+=i+=h*>g+=d)<b(:`'8^&6\%5[#2W$1W%3W%3U%3Q#1N!/K#/I'2K*4J+4H.5G28F28E.5D*1?-3=?@DXTQ`XP`WM_VM_VM[SJWPGTLD¯·Ê¯·Ê°¸Ë±¹Ì³»Î´¼Ïµ½Ðµ½Ñµ½Ðµ½Ð¶¾Ð¹¿Ï¹¿Ï¹¿Ï»ÁѼÂÒ»ÁѾÃÊÁÅÆÂÆÇÃÇÈÃÈÈÅÊËÈÌÌÆËÈÆËÇÆËÇÅÊÆÅÊÆÅÊÆÅÈÇÆÅÉÆÅÊÇÆËÇÆËÆÅÊÆÆÊÇÇÈÇÇÇÇÇÇÇÇÇÇÇÆÇÇÆÉÈÆÏÌÅÑÎÅÒÏÆÒÎÆÑÎÅÒÎÅïîëÑÍÈÎÊÅËÇÂÊÇÂÍÉÅÏËÈÑÍÌÒÎÊÓÏÁÔмÖϾÚÐÅÓÏÑ—©ÆQmœEg¨Bh¶Bj·Ek´Im²Lo³IjªIj©Jj©Jj¨Jj§Jj¥Ji¢Ih¡HgŸGeHeNj¢Sn¥Tn¤Rl¢QiŸNgœLd™Jb—H`”G^‘D[ŽBY‹BW‰AVˆ@V†?T…=Sƒ=Q<P9M|7Ky6Jv4Ht1Fr/Cn.Bm-Bm-Cn-Cn-Cm-Cl,Bm,Ak+@h+@g*?e)=c':`'9^&7\%5[%3Z%3X%3V&5U%4R#2N#0K$1K'3K)3H-4F17F17E16F,3E*2B05AHGL`ZXcZTbXPaXO\TLXPHTME±¹Ì±¹Ì±¹Ì±¹Ì²ºÍ´¼Ïµ½Ð·¿Ò¸ÀÓ·ÀÓ¸¿Ò¸¾Ï¸¾Î¸¾ÎºÀлÁÑ»ÁѺÁ̹ÁȹÀȹÀȺÁȼÄË¿ÆÌÂÆËÃÆÊÂÆÊÂÅÉÁÄÈÁÄÈÂÄÈÅÄÉÆÅËÈÇÌÉÈÍÉÈÍÉÈÍËËÊÌÍÈÌÍÈÌÍÈÍÍÈÍÎÉÏÏÉÔÏÆ×ÐÆØÒÇØÑÇ×ÐÆ×ÐÆñïëÕÔÂÓÒÀÑÏÁÒÐÄÑÏÅÐÌÅÓÉÇÔÉÂÒ̹ÏζÏÐÀÍÏΫ´ÈTuªAh«Ci´Ek¸El´Go¯Jp°NqµLm­Ll¬Jj©Jj©Lk©Ll¦Lk¥Kj£Ji¢Jh¡IgŸLi¡Sm¥Tm¥Tm¤Rk¡PiŸNfœLd™Jb—H`“F]DZBX‹AWˆAV‡@U†>S„=R‚<P€:N}8M{7Ky5Jw4Iu1Fr/Ep0Ep/Eo.En,Dm,Dm-En,Dl,Bj+Ch,Cg,Bf*@d)=a';^&8^&6_&5\%5Y$4T%4T%4Q%3P%1M'3L*4J-4H/6G05E.2E*0G'2H*3E58BPMOc[WcYQbXN]TKYQIWNFµ½Ðµ½Ðµ½Ðµ½Ð³»Î´¼Ïµ¾Ð¶¿Ñ¶¿Ñ¶¿Ñ·¿Ñ¸¾Ï¸¾Î¸¾Ï¹¿Ï¹¿Ï¹¿Ï¸¿Ï¸¿Ð¸¿Ð¸¿Ð¸ÀиÀѹÀнÁοÁξÁÎÀÂÏÁÃÐÁÃÐÂÃÍÅÄÉÆÆÊÈÈÍÌËÐÍÌÑÍÌÑÏÐÍÐÑËÐÑËÐÑËÑÒÌÔÕÏ××ÐÚÓÉÜÔÉÝÕÊÝÕÊÜÔÉÜÔÉòñêÚÚ»ÙÚ¼ÙÙÀÙØÃÙׯÚÖÉáÑÉãÐÄßÔ¼ÖÕ»ÍÖÉ»ÉÓm„¨;h«;i´Bk·FmµGo¯IrªLs®Ps·No°Mo®Lm¬Lm«Nn¬Nn©Nm§Ml¦Lk¤Lj£Ki¡Li Rl¤Vo§Vp§Un¥Sl¢QižOg›Ld™Jb–H_’F\CZŒBXŠAWˆAV‡?T…>Sƒ=Q‚<P:N}9M{7Lz6Kx4Jv3Iu3Iu3Jt2Js0Jq/Iq/Ip.Gn-Gm-Gk.Gj/Hj/Gi,Cf)@b'=a(;b':`'9]&6X'7W&5T'4S(4R*6Q,5O-5K/5H05G.1F'.F$/H'2H/4B>;@^URg\SfZPaVM\SIWPFµÀÕµÁÖ¶ÁÖµÁÕ³ÀгÀÏ´Àг¿Ï²¾Î²¾Î´¾Ï·¾Ñ·¾Ñ·¾Ð¶½Ð·¾Ð¸¿Ñ¹ÂкÃκÃκÄÏ»ÅлÅмÅϾÅͽÃʺÀǺÀǼÂɽÃÊ¿ÃÊÁÃÉÂÃÉÂÄÊÆÈÎÈÉÐÉÊÑËÌÎÍÍÌÎÏÌÎÏÊÎÏÉÑÒÊÓÔÊ×ÔÈÙÕÉÚÖËÛ×ËÛ×ËÛ×ËóñëÞØ¾ßØ¾ßØÀߨÁàØÃáÙÅâ×ËåÖÇçØ½àØÀÐÙÖ„£¿Am£>j­Al²Dl²Gn²Jq³Ks²Ls¶Nr»Nn´Nm±Pm¯Rm®Sn­No«MnªQm«Sl©Ql¦Oo£Mm Sk¥Vm¦Vo¦Vp¦Sp£PmžNi›Mf™Jc•I`’F^DZŒBX‰AWˆ@U‡>S„>Sƒ=R‚=Q€;P~8N{7My6Lx6Lw6Lw5Lw5Mv5Ov4Nu4Nu2Ms1Mr1Ms0Lq1Lq2Lp2Kp/Hl*Cg(@d'>a'=_&<^(:[(:Z(8X'6V*9X-;X.:T.8N08K08J-5F$/C"-D&1G)2D.5BDFJa[UbZS_VN[SKWPIµÁ×µÁ×µÁ×µÁ×´ÀÔ³ÀÓ³ÀÓ³ÀÓ³ÀÓ³ÀÓ´ÀÓ¸ÀÓ¸ÀÓ¸ÀÓ¶¾Ò·¿Ò¹ÁÔºÃÒºÄкÄкÄлÅлÅлÅнÄλÂ˹ÀÉ·¾Ç¸¿Ç¹ÀɼÂÊ¿ÂÉ¿ÂÉ¿ÂÊÂÅÌÃÆÍÅÈÏÈÉÍËÊÌÌÌËÍÎÉÎÏÈÏÑÇÑÒÇÔÒÆÖÔÇ×ÕÉØÖÊØÖÊØÖÊòðëÞÓÃÞÓÃßÓÃàÕÅàÕÅàÕÅÞÖÆßÖÁâÖ½ÞÙȱ¾ÈPu¢8j¬Bk¯El¯Fm±Ho³JqµLs¶MsºNr¾No·Qo³Sp°Vo¯Wp­Sq¯Ur°Zp®^q®_u­Yv©Ut¤Xp¨Vn§Wp¦Vr¦Sq£OnžOkœNhšMe—Jb”G`E\ŒBY‰AW‰?U‡=R„=R‚=R‚<Q;P9O|7Ny7Mx6Lw4Lw4Mw5Ow5Pw5Pw4Qw3Qv3Qw3Rw5Rx4Qw2Nt/Kp+Gm)Dj(Cg&Ac&@a&?`(<_*<^);](:[,?^0A]2@Y1<S1<O0;L+8I$1D".D$0G'3G*7H3<EPOP`\Z^XS[TOVQM¶ÂصÁ×µÁ×µÁØ´¿Ù³¿Ú³¿Ú´¿ÚµÀÛ´ÀÛ¶ÁÙºÂÕºÂÕºÂÕ¸ÀÔ¹ÁÔ»ÃÖ»ÃÖºÂÕºÃÕºÂÕ¹ÁÔ¹ÁÔ¹ÁÔ¹¿Ð¹¾Ï¹¿Ï¹¾Ï¹¿Ï»ÁѽÂÏ¿ÂÊ¿ÂÉ¿ÂÉÀÃÊÂÅÌÃÆÍÅÆÊÇÇÈÈÈÇÊÊÆÌÍÆÍÏÅÏÐÅÒÐÄÔÒÆÕÓÇÖÔÈÖÔÈÖÔÈñïìÚÑÊÚÑÊÛÑÊÜÒÌÜÓÌÜÓËÝÔÂÝÖ½Ú×ÅÈÏÎuЧBg¥=j¸Bj°El¯Fm±Ho³JqµLs¶NtºPu½Pr·Sq³Vr²Xr¯Zr®Zt¯aw±l|³tƒ¶v†¸n…µf€°_w«Yq¤Xr¥Xt§Sr¤Pp¢QmŸQjOh™Ld•H`‘E]BYŠAW‰?U‡=S„=Rƒ=R‚<P:P~9O|8Nz7Ny6Ny6Oz6Oz6Pz6Ry5Sy4Sy3Rw1Rw0Qw1Qw2Qv2Qu0Ns,Jo+Hm*Gj(Eh(Df(Ce*@c*>a*=`(<^-@`/B`2B]3BY2?T1=P,;M&3H#/H#/H%1H(5H-6F>BKYX]]XZYUSVRP¶ÂصÁ×µÁ×µÁײ¾Ù±¼Ù¯º×®º×¯º×®º×°»Õ´¼Ð´¼Ï´¼Ï³»Ï´¼Ï´¼Ï´¼Ï³»Ð³»Ð³»Ï³»Ï´¼Ñ¶¾Ò¶¼Î·¼Î¸¾Ðº¿Ñ»ÀÒ»ÀÒ½ÂÐÁÄËÁÄËÁÄËÂÅÌÄÇÎÆÉÐÈÉÍÉÉËÊÊÉËËÇÍÎÇÏÐÆÑÒÇÓÒÆÔÒÆÔÒÆÔÒÆÔÒÆÒÐÄïîëÓËÉÓËÉÓÌÉÔÍÊÔÍÊÕÍÉÚÏ¿ÖнÎÔЙ¯ÂOpŸAi²@i½Bi°El¯Gn²Ip³JqµLs¶Nt¹Qv»QtµSt²Vt±Yu¯_x±j~´zй’œÂž¦Æž¨ÉŸÃ}’¹j‚­\v£Vq Wt¤Vt¦Sr¥Rn¢PkOi›Mf—Jb”H_D\ŒBY‹AW‰?Uˆ?T‡>T…=Rƒ<Q;R€9Q~8P|8P}8Q|6P{5Pz3Qy3Rx3Ry2Rx1Ry0Sx/Qu/Ps/Pt0Pt/Os.Nq-Kn*Im*Hl+Gk,Dh*Be'?a'=`*@b-C`2Ea4F^5EZ1AU+;Q&6M$1K"0K#1K'5J+7J2:JMQ]_^d]Z\XWU¶ÂصÁ×µÁ×µÁײ¿Õ²¾Ô±½Ô²¾Õ³¿Ö³¿Õ´¿Ô¶¾Ò¶¾Ò¶¾Ò¶¾Ò¶¾Ò¶¾Ò¶¿Ð¶¿Î¶¿Î·ÀϸÁиÁйÂкÁμÂξÄнÄнÃϽÃÏ¿ÄÎÂÅÌÂÅÌÃÆÍÇÊÑÉÌÓÉÌÓËÌÐÌÌÎÌÌËÍÎÊÑÒËÒÔÊÔÖÊ×ÕÉ×ÕÉ×ÕÉØÖÊ×ÕÉÖÔÈðïìÔÑÊÔÑÊÔÐÊÒÏÉÒÏÉÓÎÈÛÍÄÓÌȼËÚf‰¯=j¥Bm¸Bi¹Cj¯Fm°Ip´KrµLs¶Mt¸Pv¹RxºRv³Vv²Zw±^y±jƒ¸„•¿ª´ÏÇÍÜÓØßÐ×à¹ÄÖ•¦Áu²`{¢Uq›Ur Vu§Ts¨Qn¢RkžPjœNg™Me–Jb“G^DZŽBYŒBXŠ@W‰?U‡>T„=R‚;R€:Q8O}7P}6P|4Oz3Oy2Px2Qy1Sz1Ry/Ry.Rx/Ru0Rs1Su2Su1Rt1Rt1Pr0Os.Mq.Lp-Gk*Dh&Ad%?b(Bc+Db1Gc5Ia4H^0DX,@W):U&5S$3Q$3O&6O(9P-;P>HV\ag_aa\^ZãèñãèñäéñäéñäéïäéðåêðåêñåêðåêðåêñçêñçêñçêñçêñçêñçêñæêïåéíåéíæêíçëîæêîæêíçêìèëíèëíéëíéëíéëíéëîêëîêëîêëîëíïëìïêëîëëíëëìëëëëìêììéìíéííéîíéîíéîíéïîêïîêïíéïîêÖÕÉÖÕÊÖÕÊÖÕÊÖÕÊ×ÔÊßÏÌÙÒÜœ°ÏGs¦:n®Bp·FlµEl°Ho²KrµLt·Nu¸OvºRxºUzºUy¶Xy³^{´hƒ¹ƒšÌ±¿ÝÛâêçêçæçÞâåßÔÜß©¸É—·c£WsœSpžTs¦Ss¨So¥Sm QkPiœPhšLe—Jb“G]D[ŽCYŒBX‹AW‰@U‡?T„?V„>Uƒ;S9R€8R6Q}5R}5T|4U}4V}4V~1T|.Rz0Sw2Tv5Wy6Xz6Xy4Uv1Pt/Ot-Mr,Jo*Hl(Ei$Ae"@c%Bc(Dc/Id4Ld5K`1H[.E\,@\);Z'8Y%7U&8S';T+?U4DSR\bbih_d_ÀÌàÁÌáÁÍáÁÌàÂÌÝÃÌÝÄÍÝÄÍÝÃÌÝÃÌÝÄÍÜÇÐÙÇÐÙÇÐÙÈÑÚÈÒÚÈÒÚÉÑÙÈÏׯÍÕÆÍÕÈÎ×ÈÎÖÇÎÖÉÏÖÊÏÖÊÏÖÊÐ×ÊÐ×ÊÐ×ÊÏÖËÍÓËÍÒËÍÓÌÎÓËÍÒÉËÐÊËÏËÌÎÊÌÍËÍÍÌÎÍÌÎÍÍÎÍÐÏÎÑÏÏÑÏÏÑÏÏÑÏÏÑÏÏÐÎÍÏÎÊÏÎÉÏÎÉÏÎÊÏÏÊÐÏÊÖÏÉÈÌÝl‹¾:n¯;s±Fq³MlµIn³Ho²KrµNu¸PwºQy¼Vz»YyºVx·Y{¹d¸{ŽÀ©µÝÛäïéííêëçéèäåååÜáå°½Ñ~–¾d«Ws PnŸQp£Rq¦Ur¦Wo£TlŸSiœQgšNd—K`“G^D\CZ‹CZŠBWˆ@V†?U…@W†>V„<Tƒ:T9S7T€7U5U€4U€4W4X1V1U€3U5V7X€8Y~6X{4Ux2Qu0Nt,Kq+Jp)Ip$Gm!Ek DiBg%Fg,Jf4Nf6Na4J\1J]0G]-B[,?[';X&9W(=X-C[7I[FS]cjmdhf¼ÊÞ½Ëß½Ëß½ËÞ¿ÊÜÀÊÛÀÊÛÁËÜÂËÝÂËÝÂÌÛÄÏ×ÄÏ×ÄÏ×ÄÐ×ÄÐ×ÄÐ×ÆÏØÇÎØÇÎØÆÎØÇÎØÇÎØÇÎÙÊÑÜËÒÜËÒÜÈÏÚÆÍØÆÍØÆÌÖÆÊÑÇÉÑÆÉÑÅÈÐÄÇÏÃÅÍÃÆËÄÇËÄÇËÄÈËÆÉÍÆÉÍÇÉÍËÉÎËÊÏËÊÏËÊÏËÊÏËÊÏËÊÍËËÊËËÊÌËÊÍÌËÍÌËÍÌÊÎÎ̪µÍSu°9o³<t²Ir³On¶KpµIp´Ls·Ov¹Pw»Ry¼Wy½Zx»Xw¸Z{·k‡·Ž¡ÆÄÏæéîðîîììêçêçåèæçÙÝ䨴Ìwºa{«Vr¢Qo Nn¢Op¥Vr¦Xp¥Vm¢SižRgœOd˜Lb•H_‘E]ŽC[‹BZ‰AX‡?V…=Tƒ>V…=U„;Tƒ:S7S6S5S4S€1S2U€2U1U€2U‚4V‚5V€5V5V}4Uz3Tw0Qv+Mt'Jr%Hr!FoDmDnDmEk#Gi(Hf2Oh7Qf6Ob3Nc2Kb/G`+A\(?\'=\)A]-F^:Pc=MYZdiflk¹Éà¸ÇÞ·ÇÞ¸ÇÞºÇÛºÇÚºÇÚ¼ÉܾÊݾÊݾËÜÀÍÚÀÍÚÀÍÚ¾ÌØ¾ËØ¾ËØ¿ÊÖÁËÖÃÍÙÄÎÙÃÌØÃÌØÃÌØÄÍÙÄÎÙÄÍÙÃÍÙÃÍØÃÍÙÃÌ×ÄÉÓÄÉÓÄÉÓÄÉÓÃÈÒÁÇÑÂÇÎÂÈÍÂÈÍÃÉÎÄÊÏÄÊÏÅÊÏÉÊÑÊÊÑÊÊÑÊËÑÊËÑÊËÑËÌÑÌÍÐÌÍÏÌÎÐÏÐÓÐÑÓÏÑÔÍÔÝŠœÀIl®>q·?u³Jt´Op¹Lr·KrµNu¸Ov¹PwºRy¼Wy¾Zx½Xy¹[}³p޵™°ÆÒÞçðòñðîêîëçëèçæäéÉÎÜ–£¾n†²\v¦Uq¡Qo Mm¡Mm¢Up¥Yp¥Wm£UkŸRhPfšMb–I`’F^E\CZ‹@Wˆ>U„;R‚;T‚;Uƒ:U‚7R€6R5R3Q~2Q~1P}1Q}2R1S€3U4V€3T~2T{2Tz1Tx1Tw.Sw(Nw$Lv"JvHsEqEqEoFl#Gk(Jj/Ol3Pk1Ng0Mi/Mh/Lg'D`(Ea(Eb+Jf/Nf7Sg8N[M]ders³ÅÞµÆàµÇàµÆà·ÇݸÇݸÇݹÈÞºÉߺÉß»Êß½Ìß½Ìß½Ìß¼ËÞ¼ËÞ¼ËÞ»ÈÙ¼ÈÖ¿ÊÙÁÍÛÄÐÞÄÐÞÄÐÞÄÐÞÁÍÜ¾ÊØ¾ÊØ¿ËÙ¿ËÙÂÌÙÆÎÙÆÎÙÆÎÙÅÍØÅÍØÄÍØÃÌÕÃÌÔÅÎÕÆÏÖÆÏÖÆÏÖÆÏÖÉÎ×ÉÎ×ÉÎ×ËÏØÌÐÙËÐÙÌÑØÍÒ×ÍÒ×ÍÒ×ÏÔØÐÕÙÒØÝ¼Ëáh‚¶Ekµ?p¸?r®Gs²Nr»Ms¸Mt·Mt·Mt¸Nv¹PwºVx½[x¾[|¼^·r‘·š°ÅÐÝæïñòñïîïìíëéíÔØå©¶Ï“¶f¬Zu¥Ws£Rq£Nn¢Ll¡Qn¢Wo¤Wo¤Vl¢TjŸQgœMc—Ja“Ha’G_E]BZŠ>U†;Sƒ:T‚:Uƒ:U‚8T6S€4Q~3P}2P~1P}0O}0P~2S3U1S}/Oz.Ox0Sy1Ty0Tw/Sw*Px&Nw#Lu!KtIsGqGp"Io$Kn&Km*Mm.Pn-Ol,Ll+Ll(Jh$Ec)Lh*Lh.Pk.Qj4Ti7SbAXb\pt­ÂÞ­ÁÝ­ÁÝ­ÁݱÂܲÃÛ²ÃÛ³ÄÝ´ÅÞ´ÅÞµÆß¸Éá¸Éá¸ÉáºËãºËãºËã¼Ëß½ËÛ¼ËÛ¾ÌÜÀÏßÀÏßÁÏßÀÎÞ¿ÍݽÌܼÊÚ»ÉÙ»ÉÚ½ÊÙ¿ÊØ¿Ê×ÀËØÁÌÙÁÌÙÁÌÙÃÎØÄÐÙÆÒÛÇÓÛÇÒÛÇÒÛÇÒÛÉÑÛÊÑÛÉÑÛÈÐÚÈÏÚÈÏÚÇÏØÆÎÕÆÎÔÇÏÕÊÒØÌÔÚÎ×ß¡¸ÙOo±Cj¼Bp»Aq­Gs±Lr¼Mt¹Mt·Mt·Mt·Nu¹PwºVx¼[y¼[|½`‚½s¿’§É¼ÈßÝâíéêðâäìÌÑâ§´Ñ€šÁi‡´_z©Yt¤Vr¢Sp£No£Kl¡NjŸSj Ul¢Uk¡RhžOe›Ne™Jb•G_‘D\ŽC[ŒAY‰>V†<Tƒ9S‚9T‚9Tƒ8S‚7S4Q3Q~3Q1P~1P~1Q2S2T€0R|.Ny-Nw/Rx3V{6Z~9\€8Y~5V{0Sy+Pv)Ou&Mt'Nu)Ou)Ot(Nr'Np(No'Km%Hl$Hk#Hi#Ig+Pm-Sn.To-Sl3Vl7Vg;VaSlq¯Åá±Çã±Çã±Çâ±ÅÞ±ÄݱÄݲÅÞ²Æß²Æß²Æß²Åß²Åß²Åß²Åß²Åß²Åß³ÄÛµÅÙ·ÈÛºËÞ½Íà½Íà¼Íà¼Ìß¼Íà½Íà¼Ìß»ËÞ»ËÞ½ËÝ¿ÌÛ¿ÌÛ¿ËÛ¿ËÛ¿ËÛ¿ËÛÀÌÙÁÍØÃÏÙÄÐÚÄÐÛÄÐÛÅÐÛÆÏÛÆÎÚÆÎÚÆÎÚÆÍÚÆÎÚÃÌÖÀÊÑÀÉÒÁÊÑÂÌÑÃÍÓÂÎÙ€ÆBi±@i¼BoºBq­Fs²Ks¼Mt¸Mt·Mt·Mt·Nu¸PwºVyº[yº[|¾`€Ám‰Äƒ—ÉžªÔ²½Ù¸ÂØ®¸Ðš¨Ç€—¾g‰ºZ~³Yu¦Xs¤Ur£Rq£Oo£Mm¢LiŸOhQhžSk¡Um¡PhD\Ha”G`“C\ŽAY‹@Wˆ?V‡=T„9R‚7R€8R;V„;V…9Vƒ8Uƒ7Vƒ6Uƒ6Uƒ5Uƒ4V‚4V3U€1R}0R{0Sz3V|7[<^€@]>]~=]<]€7Y}2Uy.Sx,Rx*Qv)Pt'Os&Or'Os(Nu%Kq#Jm$Kl)Qo-Vr-Ur+Sp/Uo2Uj9WfNjs²Æß´Èá³Èá³Èà³Çà²Æß²Æß²Æß³Çà³Çà´Çà·Èà¸Èà¸ÈàºËâºÊâ¸Éá³Æß±Åß³Èâ´Éâ´Èâ´ÉãµÉâ´Éà´Éß´Éà¶Ëâ¸Íã·ÍãºÌà¿ÌÜ¿ÌÜÀÌÜÁÍÞÁÎÞÁÎÞÅÏàÇÏáÇÏáÇÏáÇÏáÇÏáÇÏáÆÎàÅÌÞÃÊÝÅÌÞÆÎàÆÎàÅÏÛÄÐØÆÍÞÈÎÙÅÐÍÂÓÒ³ÊÝcŽ¿;o¯<o±Ar³Cr²Fs´It¶MuµOvµPx·Pw·Px·Rz¹U{¹Y|¹Z~»\€½b…ÁmÉy˜Ð„žÓ…œÐ}•ÈtŒÀi‚¸_z±Yv¬Xu©Vs¦Tp£So¢Pm¡NlLjJgœJc™Ja—D_“9ZŒ#Fw2N‚>V‹>VŠ?W‹D\E\AYŠAY†?X…?Y†A[ˆ@[‡=X…<Xƒ:X‚:Yƒ:Yƒ8Yƒ7Y‚6X4X3W2W€1V/U}.U}0U|5X{7[}:^<_ƒ;_ƒ<`ƒ7\€/V{,Rw)Pu)Os)Pt)Qu&Qy&Qz"Mt Ko)Qu-Uw)RvLr Lq)Ts1VnEdv¨¼Ü©½Üª¾Þ¬Àß°Äà²Æá³Èâ¶Êå·Ìæ·Ìæ¸Ëå¹ËãºËâºËâ¹Êâ¸Éá¶Èß³Æà±Æá³Èã³Èä²Çã²Çã²Èâ³Éá³Éà³ÉàµËâ¶Ìã¶Ìã¸Ìá½ÌܽËܽÌÜÀÎÞÀÏßÀÏßÃÏàÅÎáÅÎáÅÎáÅÎáÅÎáÅÎáÅÏáÅÏáÅÏáÆÐãÇÑãÇÑãÅÓÞÄÔÜÈÐäÊÐßÅÑÐÁÔ×§ÁÛSµ:q°=r°Bs³Es´Ht¶Ju¶Mu´OwµPx·Qy·Rz¹T|ºU|¹W{·X|¸Z~º]‚¾`…ÀdˆÃj‰Ãl‰Áh„¼b~¶]y°Yt«Wt©WtªUr¦Rp¤So£Rn¡OlžKkžJiLeœMe›Je™<_DsA^’PiLe™Kd–Jc–Ja”E^B\‰@Z‡@[ˆ@\ˆ?[ˆ<Y…;Yƒ:Yƒ9[ƒ8Zƒ6Y‚6Y4X€2X€1W€0W€.U+R|'Py(Qy*Sy*Tz,U{.X~.W},U{)Sz$Ov!Ls!Ls!Ms!Ms!Ls Nw!Ox MuIp&Pu.W{(SyIqIq#Or/Vq=^q¤¹â£¹â¦¼å©¿ç©¿à«Âß®Åã±Èæ³Êè´ËéµÊçµÉãµÉãµÉã¶ÉãµÈâ³Çá²Çá²Çâ´ÉäµÊå¶Ëæ¶Ëæ¶Ìæ¶Ìä·Íä·Íä·Íä·Íä·Íä¸Ìá¹ÊܹÊÛ¹ÊÛ¹ÉÛ¸ÉÛ¸ÉÛ¼ÊܾËܾËܾËܽÊܽÊÛ¼ÉÛ¾ËÜÀÍÞÁÎßÂÏàÂÏáÂÏáÁÑÜÀÒÛÃÎäÆÎàÂÐÕ¿Óßœ·ÚHv®<s±@u³Ct´Fu¶Jv·Kw·Mu´OwµPx·Rz¹T|ºU}¼U|¹Uy¶V{·X|¸Y}¹[»]€¼^~·_~¶]{²Zy¯Wv¬WuªXv«Vt¨Tr¦Sp¤Sp£Qo¢PlŸLkžJjžLgNfœNiž?a”>n?]ŽOhšLe–Jc”Ha‘D^C\‹A]Š?\ˆ=Z‡>[ˆ=[ˆ<[†<]‡>`‰=`‰;_‡9]†8]…6\ƒ5]…3\„2[ƒ0Z‚.X€*T}(U}&U~%T}#S|$T}#RzOwPyOyOxPyPyOxOwQy Pz"Qz#Px*U|1[,W~ MvLu#Ps0Yu;^s ¸ã¡¹ä¡ºå¡ºä¡»Ý¢½Ü¤¿Þ¨Ãâ­Çç²Ìì¶Ïî¸Ïì¸Ïì¸Ïì¸Ïì¸Ïì¸Îë¹ÏëºÏêºÏê¹Îé¸Íè¹ÎéºÏéºÐçºÐç»Ñè»Ñè»Ñè»Ñè¼Ñç½Ðå½Ïå¼Ïå½ÐåÀÓèÃÖëÅÖèÅÕåÅÕåÆÖæÇ×çÅÕåÃÓäÆÖæÆÖçÆ×çÉÙéÈØèÂÓã¾ÒܽÒÜÀÎæÁÍã½ÍÙ·Î㉦ÓGv±Ax¶Dy¸Fx¸Gv¶Jw¸Lw¸NvµOwµQy·S{¹S|ºS|ºU{¹Vz·Vz·W{·X|¸X|¸X|·X|´X|²Y|²Y{±Wz®Vy®Wx¬Xw¬XvªVt©Tq¥Ro£Qn¡Nm¡Lj MgžMd›Kgœ=`“BrDc‘Sl›RlšQk˜Pj–Mf“Id‘Fd‘C`?]Š>^Š?_‹?aŒ=_‰<_ˆ:`ˆ8^‡6]…5\„3[‚1\ƒ2]„4_‡3^†1]†0\„-[ƒ)Zƒ(Zƒ(Z‚(Y‚$V~!S{R{R{S|!V~"W€$Y‚%[ƒ#X"W€&X‚)Z‚/^„2`†1_…/]„+[‚,[€1^|7_w£Á墿䢿䢿㡾᡾ߠ¾ß¡¿à£Áâ¦ÄåªÆç®Çæ®Çæ®Çæ®Çæ®Çæ®Çæ²ÉæµÊåµÊå´Éä´Éä·Ìç»Ðê½Ôë½ÓêºÐç¹Ïæ¸Îå¸Îå·Íä¶Ìã¸Îå¹Ïæ¹Îæ»Ðè¾ÓêÄØêÇÙéÇÙéÈÚêÊÝìÍßîÎáðÎàðÎàðÎàðËÞíÇÚéÃÕä½ÓݺÑܹÉ䏯áµÇÚ¯Çäz˜ÎEs³By·Ez¸Gy¸Iw¸LyºNyºOx·Qy·R{¹T|»U}»U}»V}ºX|¹X|¸X|¸X|¸X|¸X|¸V|µW|³X}³X}²W|±W{¯Wz®Xw¬Xv«XuªVs§Ur¦Tq¤Qq¥Oo¥Pk¢PhŸLh>b•!IyIh–VqUpœRl˜Oi•Lf‘HdCbŽ@`Œ=]‰<]ˆ=^Š>a‹=b‹;a‰8`ˆ8`ˆ7`ˆ4^…1\‚.Z.Z‚.[ƒ,Z‚,Z‚-[„.]„.]‚.]‚.^‚+Z€)X})Y}&X~$W}&Z€(\‚'\'\€&\$\„%^ˆ'^ˆ(]†,aˆ.a‡-^„/`†2eŒ0dˆ/`~5bz¥Ãã¤Ãâ¤Ãâ¥Ãã¥Ãã¤Âã¢Áá¢Àà¢Áá£Ââ¥Ââ¦Âà§Âà§Âá§Âá§Âà¦Áß§ÁÞ©ÀÝ©ÀÝ©ÀݪÁݪÁÞ«ÂÝ®ÅÞ¯Çß°Èà²Éá³Êâ³Êã³Êâ³Ëâ¶Îå¹Ñé¼Ôë»ÓêºÒé¼Óæ¿Ôä¿Ôä¿Ôä¿ÕåÀÕåÀÕå½Òâ¼Òá»ÑáºÐà¹ÏÞ¸ÎÞ¶ÏÚ¶ÐܹËè»ÊèµÉ߬Éèp’ËCs´Bw·Ex¹IyºKyºNz»P{»P{¸R|¹S}ºU¼W€½W½W¼X~ºY~ºY}¹X|¸X{·X{·X}¶W~µY~´YµY´X~³Y|°Yy®Yw¬WvªWu©Vt§Us¦Ss¦Rr¦Rp¤Rm¢Om Cg˜+QLj–Vp›TošUn™Tm—Pj”Mh“Gg”Ee’Bc=_Œ;^‹=a@f?g<fŒ9dŠ8c‰8d‰8cˆ6eŠ5dŠ3cˆ1a‡/`†.`…0`ƒ4b‚5b‚5c‚6c„4a‚4a‚2bƒ+^+_0e†0d†0e†/e‡.gŒ)e)dŒ-f.gŒ1i6m‘6m3k0hŠ2g„7g£Àâ£Àâ¥Âä¦Ãä¥Âà¥Ãà§Åá§Åâ§Åá§Åá§Åâ¨Åã¨Åã¨Åã¦Äâ¥Âà£ÀÞ£Àà¤Àâ¤Àâ¤Áâ¦Ãä§Äå¨Åå¨ÅâªÇã«Éä¬Éå­Êæ¯Ìè²Îç·Ðå¹ÒæºÔè½Öê½Öë½Öë½Ôé¾Óç¾Óç¾Óè¿Ôé¿Ôé¾Ôè¼ÔçºÓæ¸Ñä¹Òå¹Ñå·Ðã´Ïß³Îâ·ÌïºÏï·Ôç®Öïf“ÅDu¸Fw¾Jy¾N{¾Ny»RzºR}ºPƒ»P„»Qƒ»Tƒ»V‚¼W¼V»U‚¹W¹X€¹Y¸[~¸\~¸^¸^·]¶\³Z}±Z|°Y{®Xz­Xz«WyªVy©Wx¨Uw¦Uw¥Tw£Tv¢Uu£Uu¢PpœHi”Ro—WqšYs›[uœZtœYs™Vq™Rp›PošNm˜Ji”Fh’EgGlIpHpEmDmDnCnŒAo@n>m‹>mŒ=m‹;kŠ;i‡=hƒ>hƒ=iƒ>i…>h…=i„:i‡5hˆ3g†2g†4iˆ6k‰7m‹4lŒ0j/kŽ/l0l2n‘3p“3q”3p’6p:oŠ9l„­Êë«Èé«ÈèªÇç¨Æã©Çã«ÉåªÉåªÈäªÈäªÈäªÈäªÈåªÈå©Çã©Æã©Çã¨Æå¨Åæ¨Åæ¨Åæ¨Åæ«Èé®Ìì°Îë±Ïì³Ñí³Ñí³ÒîµÓð·Ôí¹ÓèºÕé»Öë»Õê»Õê»Õê½Ôê½Óé»ÑçºÐæ»Ñç»ÑçºÑç¹Òç·ÒæµÐåµÏä´ÏäµÏä´Ðã´ÐçµÌòµÌî±Ðä¥Ïé\Œ¾Cv¸K|ÂN}ÂP}¿R}¼V~¼V€½S…½R…¼T„¼V„½Yƒ½Z‚½X„¼V‡¼W‡»Y†»[…»]ƒ»^ƒ»^„¹]„·]ƒ¶]ƒ·^„¶]ƒµ]‚´]ƒ´]‚²\±[¯Z~¯Y}­Z}¬[}«Z|ªXz§Yy§Wx¦Ww¤Vx¡Uw Xy¢[}¥]~¥\}¤\{ ^z›^y˜[w–Yt“Wr’TpUrYvZx‘VwUvTuŽTuŽTs’Ts“Ss”Qr’Qr’Qr’Ps‘NuMt‹Kr‹Jr‹JrŒJsIsŽGsŽGsErŽErEsŽEtBt=r<s’=u“?w–?x–<v–;xš9v–9s:rŒ9o‡¯Ìê­Ëé«Éç©Çä¥Ãà¦Äà¨ÆâªÈä«ÉåªÈäªÈã«Éã¯Íæ²Ðé±Ïè¯Íæ¬Ëä«Èä©Ç婯䍯䩯䍯䍯ã©ÇãªÈä«Éå­Ëç®Ìè¯Íé±ÎèµÒé¸Õëº×î½Úð½Úñ½ÚñÀÚòÀØñ¾Öï¼Ôí»Óì»ÓìºÓì¸Ôë¶Óê´Ñè³Ðæ²Ðæ´Ñè´Óç±Ðê­Çî©Ãæ¤ÇÝ”ÁÝXоExºL}ÀO~¿Q~¼V¾Z‚¾Z„¾W†¿W‡¿Z‡À^ˆÂaˆÄc‡Ã_ŠÀ[½\Œ½^‹½a‹¾bоd‰¾fмf‹»fŠ»eŠºb‡¶b†µa…µ`ƒµ^€³]±\~°[|­Z{«WyªVx©Tv§St¤Uv¦Qq¡NpŸFnšDošEošFp™IrœJsIr™Hp‘Iq’Ho‘GlŽFkEkFiŒHj‹IlJp‘Ip‘FmŽHoLoLoŽLpJoŽJoŽKqLrŽMsŒNuŒNuMuŽNvPx’QxRxRy‘S{“T{“S{“R{”Q|–N}—L}—L}—J|–I|•G}™E~B}›?y•=u;qˆ«Éä¬Êå«ÉãªÈã°ÎêµÓï¸Öò¹×óºØô»Ùõ»Úó¼Ûð¼Ûð¼ÛðºÙî¹Øí¹Øí·Õí³Òì±Ïé±Ïé³ÑëµÔî¸Öñ¸Öò·ÕñµÓï´Òî²Ðì¯Íé­Ëç¬Íç­Îç®Ïè°Ñë°Ñë°Ñë²Ïê³ÏëµÑìµÑìµÐìµÐì´Ðë®Îè¬ÍçªËå¨Èâ§Çá§Çá¦Éà¦Èã¦Ãì¥Ãè£Èá”ÃáYŽÃG{»OÀSƒÀW…À\ˆÁ_‰Á`ŠÂ^ŒÄ`ÆdÈfŒÈg‹ÈiŠÈgŒÃd½e½gŒ½h‹½h‡ºk‰¼o‰»oˆ¹m†·n†·l…¶i‚²h€±i€µ_v¬Zq¦Xo¤Uj Zp¥Rn£GhEgœFgœ@a•@a•Bc˜9b”8d•3^Ž/YŠ1\Œ6`5c‘+aŽ-c&[ˆ+^,_.a*\Œ'XŠ'XŠ,`‘-b“(\+`Ž2g‹0f…/f….f…-e„,e„2g„9fƒ;g„<h…=jˆ=kˆ>lŠDo‹Ep‰GrŒKvMx’Q{–S~šR}—Q˜R‚šR‚šS„R„N‚œMœLœHšE|”;s‰¶Õë²Ñç°Ïå¯Íä®Ìç®Ìé¯Íê±Ïë±Ïì°Îë¯Îç¯Îá±Ðã³Òå¶Õç¶Õè¶Õè¸Øì¸×íµÔê²Ðæ®Íã¯Íã¯Íä¯Íè­Ëè¬Êæ«Éæ«ÉåªÈä¨Çä¥Èä¦Èä¦Éå§Êæ¨Ëæ¨Êæ©Éæ«Éæ¬Ëè­Ìé¬Ëè¬Ëè¬Ëè©Ëè©Ìè©Ìè©Ìç¨Ëç§Êæ¦Ëä¤Èæ¤Äï¢ÃêžÆà’Ää[“ÉKÀT‡ÃYŠÄ]‹ÄbŽÄcŒÁbŒÀa‹Äa‰ÄaˆÄa…ÁbƒÀc‚Àd‚ºe‚³iƒµm„·o…¸o‚¶sƒ¸w‚¶x€µxµu~²py­py­hp¥mt°kq­ah£_f¡\cž_f M`š7W:[”:\•8Y‘0Pˆ-N†.S‹3Z’0W,S‰)O…,R‡2ZŒ2_Ž%R€:g Jy,W†&P M~MOƒ"T†$W‰!Vˆ$YŠ$\ˆY‚![„[ƒ"]… \„ Y€)^*^‚+_‚,`„,a„*_‚1eˆ1e‡2fˆ4i‹6k9o’=r”Et‘Hw“J|—MšPƒžR…¡T‡ V‡žS†žN‚›H~–>vŽ»Ùî»ÚîºÙí¹Øí·Õí·Ôî·Õî¶ÓíµÓì¶Ôí·Ôë¸Öç»Øé½Ûì¿Üí¿Üí¿Üí¿ÜðÀÝòÂßôÂßôÀÝò¾Ûï»Øî¹×ï¸Öï¶ÔíµÒì´ÒëµÒì³Òì®Ðê«Îè©ÌæªÍçªÍçªÌæ¬Íç¯Îé°Ðë²Ñí³Óî´Óî´Ôî²Óí³Õî´Öï´Öï±Óì­Ïè©Íä¦Ìä§Éê§Èé¤Ëæ™Éìa–ÌT…¿^‹Ã^ŽÆ]Æ[ŒÃZˆÀW…½TºT|·Wy¶\z¸a}½a{¼fz³ky«o~µn}·pz´zµ||­|x­~w­„¹‚y­wp¦ro§vx²ek¥[`œeg¦ca¡_[›d^KX”0h.L„C_˜7S‹/M„1P‡3QŠ-K…9Y’;]”-Q‡*O„(M~Ai0X.W5^?i"Bl Cp Fv,Tƒ,Tƒ(Q*U„ M| P€QOSR€RS€S|W€ ZƒVZ‚"]…#]‡ [†]ˆ ^ˆ#_‡-d‹7i?j…Akƒ5bz,Zr7i‚H}˜M›SƒT†ŸP„›L—C|ÀÜîÀÝîÁÝîÀÜîÀÜîÀÜîÂÞðÅáóÈäöÉå÷ÊåöÊãñÊâñÊãñÊãòÊãòÊãòÉâóÈàóÈàóÈàóÇßòÄÜïÀÙì¿Úì½Ùë¼Øê»×é¼Øê¼Øê¹×êµÖê¶×ë·Øì¸Ùî·Øì¶Öë¶×ì¸ÙíºÚïºÛïºÛï¼Üñ½Ýñ¼Úì¼Ùë¼Ùë¾Úì¿Ûí¾Ûí»Üê·ÞçºÜç¼Ûê¹Ùñ±×úv¢Ða‡ºhŽÂ^ÃQ‹ÁF‚½E~¾Bw¸Bu±Nx¶Vs´Yn±Re©Ma¤nz²rs¥oq«vx¸ŠˆÄ„{«‰zž›‰³…p›t›™~¤Šv¢rhrn¤qi›oi ^]˜SX”CO†<Lz$=k +*\2g8L‚GYF^‘5O‚AVŒEZC]6T‡>n +1_9d>e.T4] Fs>m@q'M(O‚!I|DvAsI{L|$TƒQ~P|P{O{JvLxP{TR}R{!\…"\†U‚S‚]Š\ˆ Z/X}Fd‚JexC^l7T`"BO:K&VlAt‘Dy›K€ŸN‚›N„–HÆáðÆâðÆâðÆáðÅàïÆáðÇãñÉäóÊåôÌçöÎçõÏåóÏåòÏåòÏåòÏåòÏåòÏåôÏäöÏåöÎäõËáòÉÞïÇÝîÇáðÆáðÄßîÃÞíÃÞíÃÞíÁÞî¾Ýð½Üï½Ûï¿Þñ¾Ýñ½Üï¼Ûï¾Üð¿ÞñÁàóÄãöÅäøÇåøÉåôÉäóÉäóÊåôËæõËæõÊçòÊèîÎçíÐæïÎåöÆãýНÔa‹¾\ÆM†¾?¸?~¹9s±9n°;m²?i¯Ml³Neª<T• ;xXp©s~³|v§‡sž¤³£’·‡} œŽ­™…Ÿ§§µžµ›‰£oc„ˆ{žŸ†ª|iTN|6?k!7[6Q-O)X&X$Y)].a5f"=o+F{'Dw'Cv7U†4Rƒ%Gv<e-V4_ Ft%I{(L~)N€&M~Ex Gy?qEw J| O}KxMyO{RQ~IvP}U‚IuFpMwItErLxZ„\„!Wz4^|Gf€Gdw7Ud+HT"?L;J=Q%Uo:s“@z˜G~—N–OÎåóÎåóÎæóÏæôÍåóÎåóÏæôÎåóÍåòÎæôÐæóÓæñÓæñÓæñÑåðÑäïÑäïÒåòÓæõÓæõÒåôÐãòÑäóÒæõÐçõÎæôÍåòÌäòÌäñÌäñËäóÊåõÉäõÈãôÇâóÆáòÅàñÃÞïÃÞïÄßðÅàñÆáòÇãóÉãóËãñÌãñÌãñÍäòÍåòÍäòÎæðÑçëÔæéÖäéÒãíÎå÷›»×^ÀJ…Â;|µ3v¬/n¤9o¦5d¡3_¦9^§Faª<S—#<y.e)Kƒ_u«~wŸ¨ˆ¢»–¬š„ž{v–‰{›“}›†o–€ž—Ÿ‚mŒ]QmNYmALh?BlXS…€u©‚s¦.=k�)S'T6f.@r';l*Br<n=q6j :n/G|;P…4N;e'Q1]3V…8Z0R†(M$Hz"Fx!Ev7g4e9i<j?lCpGuGuAo >mDrIxGtEq +>j =iDnFqDmNt%Yy&Tl4^q>fz7[m.M[ ;F7E4E7M+d6s?x“J|“U’ÐåðÑæòÓèôÔéõÓèôÓèôÓèôÒçóÒçòÒçòÓæñÕæðÕæïÕæïÕçïÕçðÕçðÕæñÕæóÕæóÕæóÖæôÖæôÕçôÓçóÒçóÒçóÓèôÔéõÔéõÓéöÐè÷ÏçöÎæõÍåóÌåóÌåóËãòÊãñÊãñËãòÌåóÌåóÍåóÐåòÑæñÑæñÑæñÑæñÑæñÑåñÑåîÔäê×äéÖæîÐè÷«Ëâ\Ž¿B»5u«0oŸ6l˜3]‡6d.h.H…?R‘=M‹DW“5Oˆ ,c4gOT|•ƒ ¡ˆƒq†jby|j†©‘²€kŽzf‰´œ½½¡½¢‚œŸ€¤ˆ®h™[JULƒTQ„)>k(R,YBSƒHR„4=o.;m5j6l3i 6l)Av&=r6i8d .Z*X8i/Oƒ3T‰1S„$HwCq Dr%Hv&Iw'Ky)P-V„.X† Lz<j 9g>nBqEsJyJxCpAnEqErBnFoWw(aw7n€;o„)Ti AP!:F#7C,?M.A!Rl3lŠ6pBvW„–ÕèòÕèò×éôØëõ×êô×êô×êô×éóÖéóÖéóØéòÜëòÝìòÞíôßîôÝìóÜëòÛéòÙçóÙçóÚèóÛéõÛéõÛêõÙëõÙëõÙëõ×êôÖèóÖèóÔèóÑçôÑçôÑçôÒèöÒéöÒéöÓé÷Ôê÷Ôê÷ÓéöÑçõÑçõÑçôÓæñÓæðÓæðÓæðÓæðÓæðÑæôÎç÷ÒæòÔåîÐæðÌè÷°Õë^‘¿=x¯0lš<r˜Bl‹,Gc-I%HGLS„^b™LUEU’-c&Bp=Sƒ>Hv[[~tj¨™¡¼§«ÚÆÌ­ž¨s~¶¡§°’£xtˆĎž”i„}an`€b_|4Gh'Q%TMPƒytªqj ie›\dO]—0@y0g6k5h/` .[ ++X +*Y$Dv>]’2Q‡&Gx#Er Cn#Eq Bn<h$Gs,P~,R*R$M|GvFu@p=n>n<l =k?mCqGvGxIzJwUy&kƒ,s…+h"Ri@R3?&4=#-8"4%Jf4f‡3kŒ=s\‹žÜëôÝëôÞìõÞíöÝìöÝì÷ÞìöÞìöáî÷áíöáíöâïø×æô¹ÌÝ©¾ÏÅÜçÞôúàï÷âí÷âí÷áìößêôßêôßêôÝêóÜëóÜëóÜëóÜëóÜëóÜëõÛìöÙêô×èó×çò×çò×çòØèóØéôØéôØéôÙéôÙéôØéóÖéñÕèïÕèïÕèïÖèðÖèïÔèôÑèùÓè÷ÔçôÓèöÒìûÃãöiŸÈ0s£#e‹=y•8d{"<Q,@+< ,7<bab•SUŽLRŽ$:m3^5UˆE[SYƒƒyØÄÊÑ»º›Š‡À´­ÏùèØÍàȾʯ§Ì·­Ñ¶°É¤£Ëž¥É–¨·…UHh.V+6b'&Wka•gVS@zME€BC~JQŠHT‹BU‹;S‰3N‚ =m-^,^0d"Av.N‚.O~0S1T€+NzAp=l@pBr=m@o)O,Q‚)O€ Hv$My(Q~Gt@l =jBqEx @x Cy Ev"]‚9vŒ0lz,^r*Vh)JW(8E).<+&:+Pr.`ˆ4k?q‹h”¢èñøèñøèñøèñøèñùèñùèñøéñ÷êñ÷ìñöèð÷ËÝëtŽª1Qv6Y2Tk§ÅÎãõúêóúêóúéòùçï÷æï÷æï÷æï÷æï÷æï÷æï÷æï÷æï÷æï÷æïöæð÷æïöåîõäíôäíôåïöæïöæïöæïöæïöæïöåðöÞðôÛîòÚíñÚíñÛîòÛîòÜíôÝìøÝìøÝìøÝìøßîùÚìú³×+v /}œ:‚™Th3I+?"/'/6\ty¬lm¦WW3I{2`<lJW†SOu}”¸£°…q‰~nƒË¾ÂóèãÎÃÉy‰tc}n\q†jt’ij½ŒŒÕ¡­Â«|g‰07\NSy20[pg–Šx¬wa˜l_—jeœji¡`e›[dœP^•;N…#<r5P†)Ez3g8j1c +.Y4]=gBoBr@t<q#Dv"Cu6f7e=k9e3]?e:`†<dŒ Lt 9cDoJ}JH}M{ Qr"K^<G;FLS(PX.DO,3C&6 <S+Z„%_,b‰Jr†Ÿ§ð÷ýïöüïöüï÷ûðø÷ðøõïøõñúøïø÷òúúÀÓØ]†š4aCl9c +(GI^pÜèîñøýïöüïöüîõûîõûîõûîõûîõûîõûîõûîõûîõûîõûîõûîõûîõûìóùìóùìóùêñ÷éðöéðöéðöéðöéðöéñöæô÷äóöãòôãòõäóöäóöæò÷èñ÷èñøèð÷çïöçïöëõý¦ÊäC|¥6v— `z#Tk!;R#+C";#F:=nae _d¢ELˆ:L8e*ZOYˆ|y¡†y”“€“k\~^St“‹›ôîòžÃh`oj_v~l„²˜©ÀŸ¦ª‚Šrƒ­‚Ÿ¤Œ°TMswŸcY„I?m`W‡QIzA>o;;nJN‚Zc—ZiSešI_“.E{;TŠ3N)Gy*J|4e(T)S)T*V*Y6g:l/^ -X +-W +/V-Q1Q +2S:\'Mo+Pp<\7V!Cb+Kn+Mu!HoAf<Z 0H.?JR:w{4ot+R[#8D*3!FY'\‰$c–']…W|ާ­ó÷ûô÷ûô÷ûô÷úôøñôúðòùñòûöïû÷ðüú¢¾Ã>zSv:f7c(ILWlàäìôøüóöúóöúòõùòõùòõùòõùòõùòõùòõùòõùòõùòöúó÷ûó÷ûó÷ûó÷ûó÷ûó÷úòöúòõùòõùòöúóöúóöúò÷úñùûðøûï÷úðøúï÷ùîöùïöøñõøñõøòöùóøúðô÷áæê½ÒåPu› +6YDc1c}2Kb%=7')UDF}pt²af¥EMˆIO‚X\ˆ-4bDKy  É€w˜o^zocˆXRu’ޤøöýäâê{y†aZnjWt{f~†˜uˆ\?WxWx„l‘L<bxeŽxd6(U<9e>Am57f+-^/6h.:n,<q)?s3K€.F}:SŠ+G}2O„)K~!Cw<n6i /a)Z*\,],]-Y/X,Q,K/H2G 6N6V9W!?Z8QhSh|[m€IWm.=W#9S:U:VHeRn=m|E‚Š:x‚/Sd+4C/@V†"e/f…¡±»ÇÆùùúùùúùùúùùùùùñøùðõúôôüùñýýáðò‚¢«,h€$`ƒ >i1Z2Db¦«¸úùýúûüúúûúúûùùúùùúùùúùùúùùúùùúùùúùùúùùúùúûúúüúúüúûüûûýûüýûüýûûýûûýûûýúûüùúûùúûùúûúüüúüýúüýúüýûýýùûüöúüôûýéñôÛâæÔÛ߯·¼hpwGSi=[y%[z+nŒC|—4Ui&92(1[>DyadžFFNMƒaV…m˜g`Œ"$QIKv[U|^Psynˆ›”¨ÉÂÓòëößØã¦ž°bWohUvaPqL@]cWs_On\FisaƒM>adMu¥ˆµ‡qžRLulq™qpžVRƒ<<m27j/:n(8lHZ1F{6k2L€MjNlŸHhš>a•9]“/S‡>p9g8e 2\/S2R3N9O:XhSmyWmzXl~^q‚gx‡jy†gs~]grFNXDKT_isFYf<\pEtŽV‹¨]‰œD|Œ/k4Sl*)?1&. '0Gi!W‚Fr’³ÅÎÏÓÏþýüþýüþýüþýúþû÷ýüøùûûãëÇk}Šjˆ™u¨À?r“?f0Rš¨ºùûýÿýüþýûþýûþýûþýûþýüþýüþýûþýûþýûþýûþýüþýüþþüÿþüÿþüÿþüþþüþýüþýüÿÿýÿÿþÿÿþþþüüûúüûúýüúþýûþýüþýüýüûÿþýþüûó÷ùÌÚ⌚¥rŒo~‰YhsFT`S_qFbz@z–7„ /tŒ(Td$=J '<.OR^Š|~±`XŒ`Tƒ“x£”pš†u BAn25cZW‚aT{±¤¯ýóóûñ÷µ¨¶scxo^x`MjkV{ZMsD@dMLpLEjTFjg^}XQojTz¨‡²¥‡´dV€\[ƒ‹€¯‰{­|r¥to¢ghfk¡eo¥):o%XF]Mh™?\ŒBa‘Gg›Ab™Bc˜@a’;]‰;^‡9_„+_{+^w5\qYq‚s}‰}{„zv{tvwvz|pwzW`eHRZLX`EOT[`cmrr_jlNdn6\pEv:r‚,x†,}+`w0AS<>?4:5"5B'Jdb“¿ÇÊ¿¿¹þýúúüúöþýõÿÿöÿþô÷úÈÌÔz‰“Xr~Rj{Gi€>~™4m&Os8Zzˆ¡ÌÓáÞÙåôñøõûü÷þûýüøÿûõûýôóÿõøÿ÷üþùùþûøþþýüþÿûÿþÿÿþÿÿþÿÿýþþýþþýþþþþþþÿþþÿþüÿþúþýùþüøÿýöÿÿúÿþüÿû÷üù×åè§À̃£´h†—av‡WgvDTdNevHgx9Zj/Zl2o‡.sB~•6]m5LU;MYCSdUcyck‡XWuLCczpŒŽ€†±ˆ~¯'7d1Dp]\…²¥¢ùíÙúòêÄ»ÀuhyhSmˆoŠjQjdRnWNo[UzUJq^MsaXzQJk[BltX‡WJy:>k>GsZZ‡rnz«|v¨wq¤wp¥in 'Bm*U1O{7TƒGc“OkœFo•IlYfŽXq•T‰¢\‘ªe‹¨U SŠ™Tx†Zkwcfnrmqhdc\^XYa^FTT1BFFW[m|~rur{}xEUU>[c&IW&H[?_r7hq/w€1‡—!j}1[e0A;FF9ZTPGOXVcogmq^aZþýùõúøØèé¿ÙÞ¾Þæ ·È]q‰Io†Dz8f‚7iŠ5€¡'f‰%OtF`„cv˜]pP^z{“¦¥ÌÒÈåèñùûüúúúýøøýöýùöÿøùüþþ÷ÿÿýýÿÿüÿþþÿýÿÿýÿÿþÿÿþÿÿþÿÿþþÿþþÿýÿÿúþþõüýàéé¸ÇÊœ½É¤ÁÊ»ÏÑœ³¶iœE{˜7lˆ?`nFYe9DQCQ`Ol8ez.dt Yi)cz5k…8cz,IZ2BNDJUakthxbt}YfrQWg?LZQm|\z“Ws™"8f3Bs:Bl²šœûÜÌþèÞûíèż¹µ¯©æÜÖ¶¢¡yhpZQfPKjLFiOEiUOpH;^T5a[Dt:>k/[/_1Bm/@i=Isjpuv¥sp ir›?d€-Qm4VvKjŽMgUl—YpŽgr‰hp‰U™=¢¢@‡”\iŠOt‡Do{AWePVcZW`^[^VUULMMDLQ6CM*9DGQYty}vunS^V4]a(gv\pPb'JXFajGp}%^r*cw-P\+00K>6RD<KFJ]bmW`iQ[Xüþûõûú¿ÎÒ\w‚2_t>eƒKn‘1hb‡%f’@y¨-i‘!V|"KpFfˆbXwBl‰/pŠ7ƒ–5pƒ€¡¶ÃÝèÓîõöøÿÿöÿÿòþþüþúÿüýÿúÿýúÿþýÿþýÿÿýÿÿýÿÿýÿÿþÿýÿÿýÿÿþÿûýÿùýÿÓÚÛr‰%Jf;U/M^MhvWvŠ>gƒ?auixz€‡ˆrw{es}<Yl+Wp!Wk%^p9p…>m…Flƒ4Ob?Qb7EX<O`rŒ™oŠ•NfoHYbO[iEm{2Ž”4 *Tz6Ap>RwNfnŒ˜˜®«²Â¯³ïÓÌÿâÊúÜ¿ëÒÅžŒc]kCD_@CeTUyQMlgTqŠhŽ`Hq==c.8`$)V+T1V/U=T{Tj‘EZD[|Edt?\l(DV>WnRhƒVj‡RdSYwMVt6gz#zƒ"j{0Ll#?W1D'5H9;M>:I6/<.(4#!/"5#:"*@NPbyu‚fhkAWX8gqbt^qYiVcMl|Om€<`vKm8IWEBIVNO)))7<FEO_@MZS_c÷üûñúûåôø§³[|Š¥½ËÈßí=j† Hg+fŽ.^ŒLwEm;_Cb?Z8P(KkOs[x!fƒOo2€›D¡²p¬·º×Þçõüïÿÿðÿüûù÷þö÷úúûúüýùûüùúüùûüúûýúúþùùÿøúÿöúÿôúýñùû©¸À:Vl":NsƒÕàæßéíØäëãìðõ÷ôûýùùÿý¨¸¾+I\<W7O%\p<l€7^r5Ti.F\$7N$6N!:P6Vh!BP2?+AOFUh?Tn$Zqbuqƒ\rD_o'Š4v“;TqíÅÀûÉ»¹‘ŒtV]`NcVKmPFoJ?kJ?`mXsÓÇÔ¿¶Å±±¿³µÄµ²Å§¬½ ª¹ «¹Ÿ«º¡®¼¡°¾©·Á§¬š£§›¤©Ÿ¨¯£­´¢«´Ÿ¬µ¡¬·¦¨·£¨·­ºµÀœ³½Ÿ¯¹Ÿ­·ž«µ£®·§±¹¢ª²¥­µ¡ª³ž©´Ÿ«· ¬·©²»¼ÁÇ·¹¾²µ¼­¶¿¤³½¤¸Â ·À§¿ÆºÏÖ·ËѲÂÇ­º½®¸»·¾À°·¹¦­¯­³¸¨®´­²¸ºÀÃëóôçñõâñúÛïùßñôï÷ûËÔß3Sf"Xn%Xw 6_3_2Z-O*G&A*H_•¥¹|©LwDt‹/a{iˆ”ˆ’+v…a“£šÄÎÊìðåîöíëöìõüéôúçòúèóûèóûçòúçñúæðùåñùãòùäõúßóöÌàä´ÈÏ´ÅÌØæéëôôëñîíñíìððêðõæòóæ÷÷–­´"AT ,HEa7l„&Oc9K+>+B+C 4-1�.8.N/O-4W*.Y;^`qXf8R$Nt0u¢.Š·.“¸o…HtwŽœ™“‚cRhZPqZS|YN|A3`I=`A2OŽÊODi08]BFqSDx>9i7=i+8b'<d.R3U1N*? 25,C0J1L-P)O /Q7U Bc 6]#O'Q3YBf RuHm>d@e5V�.Q9\ +:Z=U?[m8DV9;P8;T(/J%@+D-Xn7~0o{5^b:UT4PO*OR;@28"2;$/19D<GOáìîßêñÛé÷ÖéúÖìòßëô•£¶(Nf+h…YEs4_�/T2S-J7S¤»ÚíóÖóðÉîîÍèñÌßð ÃØe¢µ?€š@pBi‹K{•]”©Go…Nd{€•¥ÄØæÖëû×ìýÖëüÓèùÕêõÕëòÑêïÑìñÔòõÎîñÍíðÍëòÌëóÌìôÌìõÐîöÕðö×îùÔéûÒìøÇåí^~ˆ4F3M/a~1f€4H*:#5 7/!$�*;#4_LUŠ6Dq9Z5Y/GqDQ}*1X#,J+3L"Pho‡ +š°™«iw;anGaw2Ol*Il <c/Bi6@cADdNFhÄ¿Í;=e#4]'._RA|~i¡iZŽB<l27d&7_/U.R0Q(J $G%J(O'N )P (L�-O 6\,Jw.Iz:m(<x4Kˆ4U2Y“1V‘5R‘$A| 1a +4d<l4_$>bK\w2GX&<H/:H(.> ((<M9`r_x%Vi8IP:;<)03&0 /9-0$)$ÎëøÍæôËãòÎè÷ÎìöÐíù~œ²&Qm$_Sw<c�2Y�1U/Q 1Px—²ËäûÄâï¾äèÀåìÂßëÅÚíÆÝòÄæú¾æúºÞó¹Üô´àô¢Õ爹Ëy£·Tzj£ÀãöÄäøÄâõÃàòÁâñ¼Þí¼ßîÃçõÊðüÂê÷½äò»ßì¿ãó½äô¸ãö¶ãù¼éþ»åú¹Þñ¾ãô ÄÕ4Uh =U8Up6i‚ YqD[">T$:20 -.81^1C{=H…dj£T`Ž>LzSS…{²†r¤{z¡Uc‚0Oj$WmVhO_%AR:EU8GU?O'av7y‘B{”=f},;T,1K·½Æ5HeMQy`O‚„f uª†t¦SK{+0]&8b8a>e9`9b<f ,X+X(V)Q)M(O "O0`;Z†>g’E_•@U’8Q“4O“1L‘3KŽ*F‚Bt!Iz@o5]8NjVbt/?N.< /=#2&4F[i3\j+• Sh, 12 ±Ùî³×ê¼ÝîÀàï»âí¿åô‹­Å7\z$RsQt6[�+R+P(K:^}®Õî¾äû»áö½âö¿å÷»àó¹ßó¹ßó¸Þñ´àð³âñ³âñ²àï©Øç¦Ôä±àï•ÃÖk™¯°Þñ®Úï°Ûð´ßô«Øï£Ñê¨Óì²Üó·ßõµÜñµÚî¾ßïÁâò»ßñ·ßô²Þö±Þø¬Ûñª×è¯ÙëµÊ+Jb :U5Pk)[q![o>V *C763#866`-K!=x4I†bk¦pm¦peŸXJ‚h\‘{ªlo›a`’RIyUBhfKgtXo‡mƒ–zŽ™v‡‰wŠlrŠJ_{0Ea'6P"?3©´»#=TWTwu¢†j˜n›|s gf“:Cp#7b">h<d4[5\5^6b0^2a -Y2[ 0Y<d.Qy5Y4V1Q~7U‰7T’5P”3N‘1NŒ,N„@n 5a2[4UB[oVfp.:G#1B#3C*9)@NH`m2[hcr8M!"5'$. .5. + +  BRR±Úì°×ì°Öê´Ûî§×ç£Ðäy¸>]#Ci>f 1Z *Q%K8\z¥Å Ñì˜ËåšÈà§Ñè³Ýò¼æú±Üò±Ûó³Þõ£ÓêžÑçŸÒè¥×í¥ØîŸÑè›Ìâ–ÈܘËàšÏåœÔëœÖï—Ñì“Ìë’Èé—Êé¦Õð²Üô¸ÞòÀä÷ºÞñ´Øë­ÓçªÒç¦Ðæ¥Ðè¡Ï卨ë®ÛÉ1Of%=V@Wp*TjEZ8N +#;1+*/ +!G@o5\“;u7pDZ’dj£jh¢WOˆNF{sp¡or¡vm¡zb”}VzEh›]}¶u—¹u–¾x”Ë€£Íƒ­¿}ª–d]>`F6\,5\©³¾.J>@aj]€SIk;:`8;d;Al1=i0\#8e3]!6[,R1X*En1My+Jw=g7_ /W2Z /W .V1Y5_;l%B}4P‘5Q’4QŒ)K +4b0] +5_5VG`uL\f*;G'>L";H">JTs~jŠ•7bnUi H^)0B6:D-4')!$')&(*.k„‹©Ôì°Üô°Üõ©Øð Øí¢Öîl”³:Y'Dl=g%Ck6\$IIm Íë˜ÍëÈä—Ìè¦ÖñªÚòªÚñ¦ÖñœÌè”Åá‘Çå”Ìê˜ÐìšÑížÕòšÒðÈå‘Éã–Ïê“ÎéÌéŽËéŒÊé“Ñò“Îò’Ëí”Èè”ÅáÊã¤Ðè ÏéÌæšÈãžÌå¡Îç§Õí¬Ýô¬àöªÙï™ÀÖ?\s+@WGYo)I^'Lb:Q1((* C:hAu&V(Y“<t$D{UgŸ_f RRŒ_\“qq¥mr£enŸww¦‘~¦\~€Mn¶{ŸÀ„§Ã‚£Ë|¡Ñv Ðx£½}£¤~Ÿt`Š==n®¶Ã1T<:_YSu59V!*L-6]1=f(7b/Z0]+U'9]-@c5JpH`‡Hb‹4P{4^)R&N(P ,T 0X1X9a5c7o.Kˆ1M‹3Qˆ*L~ 3a0\9b2S7OdFV`':E6C2>8CCcn]€‰,R]#La;]p%8F3<F!)1).*. #'. #5KXzš§œÊã”Åà‘ÄሽۃÀÝ‚»ÚV„§2Y~ FkBfFi4U )Jiެ¨Õð“ÆæÅæ•Ìì”ÊêŽÄ函ބºÛ„ºÛˆ¾ß‰ÄæˆÄé}¹Þr¯Ót°Õ}¹ß½ä¾ç…ÂêÇê’Èé•Çç—Çå’Æå‘Èê”ÌîšÓó˜Òð†Âåy¶Ûz¹á}¼ã„Áç‰ÄçŠÂä’ÈéÄ↾؇¹Ñ‰±ÈKg}3FZ?M`,DY">T.F 6 (#/Hq—Bv¦C|"Y–6h¥(R;t0LƒYi£X^˜_`šdfbkžGb–Je•\eŽ^UxfRstY}™xŸ®€¨¶€¥¶{œ³{›¬‚¡˜~Ÿr\‡OBs¶·ÇAClZM{G>i#*O06\8=f:Eo!4]3\5^-S$5V0@a,?b)?c&=d1Y 'P'O(P 0X2Z 0Y8_>d8c:o(E1O‡7Uˆ>m1_3`2\2S;Sh<LV"2>+>M8O],FSA]iGdo%BO-GY%IW4=&1!  &1GXŠ­½™¿ÎªÚîÐìŒÃä»Ýy¹Û|·ÛM€¥-\€QrQoMi=X ,INr£Îé™Çê”ÄêÃ䆽܂¹Ûˆ¿á†¾à‚¹Û}¶Ùr°×uµÞ}½â€Àã~¾âw·Ýk­Ûf©às²äÄëËï¥Êë²Óï¯×òšÊ抿Þ{·Ûm®×b©×Y£ÕW£×]©Ûb«Ûh¬Úr³ÝzºáˆÆéÌé›Ðë¢ÌäUq†3DV:FW1E,B,C '=%7$-?T‘¸YžÏ#dOŽ1a Af¤6X’:p3Jƒ[f gk¥gj¢dm£C^š3o&5h@Bm[T}XNx`Kz‹`”™qœ—y˜‹smUty`†“u¢~g•ÇÄÔl_Ž…m£q`˜NOJHu><h(1[0X/U1W2V1Bb6Ee"2T%9\.Ei0W +(P*R2Z3[4\3[ /V4X<e*I{6S‹:W0M€3b-[3_CmAb8Pe@PZ,6D/:L5BS/?MFZgVky/CR'<L LT6:"+&%%)+7ERt”ªuž·d§m©Ñh¨Ôe¨Øh¬Ýl­Ût­×Tz¢=X-[yey)Gm7Z +L .OT~ž€¯Ï²ÏŠ·Î’¹Ë™ÀЩÐÞ­Õã­Õâ§Ñâ–ÉäŠÀ⇿áŽÇ烿ái¥Ìc¢Ëf¥Ñq¯Ú|ºãƒ¿ç€»ã}¶Þ†¼äŽÃë“ÉðÆïŒÃíŒÄí‹Âë‰Áì„½å€ºá‚¼à‚¾ãz·Ýq±Ûc¬Ú_ªÐn©ÉAa~0BX;R`>J7G*:Q06P'@,#I^k«Íj«×cŸÐ+b™P/^Ÿ2]™Dx7l@XŒ[m [i›[i›Qg£1K‰-c-\0:eVW‚G?jI6eUFqWOuFDg66Z88^FIwU]¾ÁÑKHw{l €i¤{f¥re¢\^“/Cq0X -R5[5Ek<Hn6Dj#7[4W4V ,M7]4^-T2W1W2Z<f8a&Iu6W‰5S‹5O‹)@~8p#@n3T=_‹@^‚I^wIUe37F58F3:A7ACYbg\bm$1? @L bg?@)),'),') "#(-jŽ~¡¸f­Vƒžw¸æb¥Ö]£Ög­âm°ão«ÙJo›3Is#Qtg}#<k2\)O(L8c…Åã’Ìç‚Àät´ßv¶ßx¸ßw·ßq±Úx¶ß…¸Ýƒ³Úv©ÑuªÔz±Ýu®Üv±Úy´×t²×n¯×fªÔYŸÊL”ÁJ‘ÄIÄS—Ë]ŸÑ^Í_œÉ_›ÇdÊ`šÇY•ÃY—Ç\žÏS–ÉC‰¿CÆHœÇ] Ã6Ww->W<Vc?K:J)=T*3O:�+*Mcp§Åx¯Óƒ¸àjÍ/a˜M‰Jƒ$L€7j-L~Pj›Oe”1Eu.F~7T5i9g0Eo3<e@ClLOxJMw@Dn4:c7>f7@g 1[.X°·Ä,;^R[„hjif¡hbŸ^d›Ld“(Jr3Y-T(2[&2]&6`&>e1V)K 2T7] -V-S1V +6[5]%Cn;g!Fs$Ew(F}4NŠ;P‘BW‘H`‹GcŽHg’Ro”I_{ANb?DT?AMIMQQVUX\]KNV)7"Sb2bm%8?%"&"  ;N[‡¥¹ˆ°Ç‚­Âx£ºx·ãjª×r²ák­Ýa§ÚWšÉ7d“(HwV~|˜@t 0].W�*R.]ƒs¬Îl¨Ëk£ÊkžÈkžÉp¤Ît§Òy¬Öнâ–Çä’Ä↹Ú~µ×z²×t®ÕoªÑr®Ôq®×n®Ùn±Ýo´âg®Þ\§ØRŸÐL—ÆQšÇU›ÆU™ÃZœÄp¬Òw²Úd¡ÎPÁQ“ËP’ÏJËDÅA’½P³4Rs0>W?VdES@S)BY&5N":0.K^»Ï‘ÁÚ†¹Ø³Ýe˜É"Q„>qGz7k<p:YŠOjšBZ‹6l9n /_ .Z'Cl*<f2?i3Dl,=e*7`4=h:?jILx=@g@Fd¼¿È-<W%:Z5`(@t=F{<Fx.Gs*Kr>e!7`%7b"5`&<f(Ck4[5[8\2Y /X +0W.U +2Y2Z2\1^ 1`?o1Pƒ=WŽBX’H^‘Lc‹Jg8X€3Sw#=Z%8N8AQ?CN@BF@@AMMPCFN4>J4M\ 5C"%3<Eq‘¨ŒµÑ«Èu ¹l’¨Y—ÀX•¾Y•¾R·A…´9}©(W…#Hw\…  Aw1]6_�,TPwtªÏ|´Ú‘Áâ™ÂᑺۑºÜ˜ÁáŸÈè¡Ëé˜Æä‰¹á‚´áx¬Ü¶å¸äpª×g¡ÍaÉR’ÀJ½Dˆ»=ƒ¶V—Át±ÔˆÃã—ÐîœÓïžÓîŸÒë§Öì«Ùî¬Üð¥×ñŒÀép¤Ù[•ÎIÈ@ŽºK‡­2Mo4?YDWg%K]&Of,Ja+AX 1F . +0\~–•ÃãÅìz¶ãm§×Xº%X‡BwJ;n8k8XŠ9Wˆ%Bt Br +2^/Y 1Y;e":e2Z'@h6Jt7Fq0;g?EsWQzdUwÇÄÏTVt-9\)V+`"2b):f(Ak+Ir=f!<g#<h&Bm(Fp=g>g!Dl 3Z /V 2Y .V1Y6^4[7_4b;l3T„8X‡<Wˆ>V‡JaŒF^,Im#El=b *I6L1BP28B65;IDGgcgRU]"/8 !'$*,24;@@HH7@:EY^…®Ä®Æb’«R”RxІÀà‹Ãâ‹ÁáÂã†Ååe£Å!Lr3]X~ ‚žL1X/S�+P;_S€¥]‹°Q‹·FмF‰»GмF‰»KŽÁX™Êc—¿a‘¸_‘º]’¼fžÉm¦ÐoªÕr¬ÙnªØc¢Ò`¢ÒZžÑN”Æ\šÅp¨Ìx¯Ñ{¯Ð³Ó„´Ñy¨Èq¡Äc•ºb–½n¤Ïi¢Ð_™ÉY–ÊQ•ËN˜ÆE~¤(?c4;WIYk"F\$Mh!D\4J 2D 0##@XlŸÃgªÙ`ªÙ^¥×a ÍMˆ·+dšK Q…?r6i Bu"Cq$Hs<e4[0X9d&Eq!:e3^6a"8d!6b.Cn=Iu7:eµ·Ä8Cd4Dh%7d0c';f#:a8`9c0\2`7eBm@k:e4_2] /Z-U.U -V2\<f7_ 5\;j,O€2Tƒ4T9U€D]‡=Ty*@^*Gh:_ƒ)Qu4S7O#9H0:BEBIUKO]W[7;B&- 54<OOKZ_JV\19:#5;UšU…¥[¬d“±l–¯bŸÈo§Ïo¥Êr¦Ê|´Õ]”²>_&K Be™'W„8Z*I)I4U¦Â®Õï¯Øð¯Ùï¬×ì­Øí¯Ûð©Õë”Á݈¸ã„µåy­Þs©Ùi¡Õ\–ÏSÃL†·TÀ^œËa¢Ï\žÌ\ Î[ŸÏWœÎR•ÉJŒÀMÁMŒ¿H‡½?„Á6|»/x¶/{·)x±*{³8º=€¹9€¯?t›)?c07SAPc@Y&Uq Ke7L!5F-$:%Y‚#l¡j¦*|´K”ÃS”ÄF…º0k¡P†"P„Fz9l6c4^5]3Z2Z.X -Z#8g'<j7d <h:d4^+W,W§·Ä8X9[/W +W/S#;_4[-W0]/] 1_7c 3_ +0] .[1^3a.W-T5_4`4_7_9a;j Du)Jw-Mv7T{JdˆG_Mb~If…Aeˆ!Jl7S$G^-DRBLR[X_UKQG@FGKR=IOGTPWZ\88@%$., ot}Ãݾ߀²Ôy¨Èržº2~·?ŠÁK—Ë[£Õ{³àV…°7b*U1X"bƒ1d‡"Gh ,J *H,NS~¤´Ü„´Ø¹Ø‰·ÖƒµÔx®În§Él¨Ë[ŸÊI¿M”ÄN•ÅFŽ¿FŽÀPÁc•Æx«Ø€´Ý‚¶Ý}²Ø…»ÞŠÁ惺åeŸÑT’ÈH‹Æ6~¼$n­ j¨&p®+u²2}¹-zµ.{¶7¼H‹Ã[”ÃMvš)B_%6N3F\=Xe}i„9X); .0;Ko•a˜Ç?¸'n¥*p£*pŸ'oœ#jœ&f›$YŽ*Q„3Q:j1a2^0Y1V0T;^<b?f!Cj Ah:b<d;` 7X©¹Ä 5T +0P /Q0T1V.?e 2Y2Y#;b8_/W-X-X-X-Y /[4` /Z.Y2^ /[2]5`<g=j6a6Z(BaMf…ToŽToŽTmŒJhˆ%Ff6PBZmO_jAIK<?A6:@>BKYZcgchKQP!B<3+6,#.(;<;=ANDJ€Ž™’»Öp£ÃY‡¤Lr‡@ev[“¾\“¼_—¼b›¿n¤ËM{¥6` -V +PAb=g†,Pq0N/M .Q0[ƒT‹·S»U»Y’½^˜ÁcÄg¡Çf¡Ä[™¿V•¾Z˜Á[šÄY˜ÂX–Âc›Çz§ÒˆµÝ½à”Âã¥Óò¥Ôð“Àà~¬Óo¡Ëb™ÈPÂ9{³%l¨f¨i«gªl®sµ"v¸%r±2r¨J|©Jn)B\'=S6Ka$Faqˆ!‡¢6W&9,:9 .aw’¢Èìy«×s¬×t®×`ÊO“ÅJÆKÈRÆK}±;d“1Z‰?n 4`:c +6\.Q1S 7[Fk#Ho;b -U0Y /T-O¨µÁ4X:^">d7]&<d9Nv'>f9_!?d9] .T+U-X.Y 4`<g 4_.Y 2]0[ +3]7b<g<h?l7a;VzVk‹WmRlLhŒ5Ps=`2S9TnSfwS^eSTRBA==@A\_etsxkbd%$!81UQY^X_M_]RTUI?B<HU=`‡)W†"Mt4TpGe|¸ÙºÖ“½ÕŒ¹ÔtªÇ=o6Y,O+M+J6Tr3Vv4S.L*LFp6nž5q©5q«B|²a—ǃ¶ß¿áŠ¹ÖŠ¹Õˆ·Õ¿Ü‘Áà‘ÀàŠ¹Ûƒ°ÓªÎw Är›¾m—¸m—¶o™·j•¸e‘¸b¶XгM‚°G¯<y­+v°)w³$r¯h¦i§i§dž*c–<j“Bcƒ(@X(>S0F](NiwŒ›:[&: *: <,$>\OwŸH|ªU¾V’¿J„¶D}·>~»8}º:¹D…·?y¥3b1\‡Hr9b4[ 8^ 4[1W 8_>f=f8b9c=e -SªµÃ;c+En*Ak5_6^:a0V-R +2V/S/T +1[ 0[ 0\8c>i 3^ +3^1[2\ 6`:d>h;e 1^"@kRiWkŽPeŠ:T~=g0W8^.RtVtgzŠDNT9:8MJF^\ZVSSZSTSHH1-*G\Yy…dgjGMK520"*Xr’s›Ã¦Ë‘±ÌºÒI´J‚²SŒºl¥ÐºÜP‚¢4V/R3U3RRpŽ1Tu7U +)G)L0]†p§Óu°Ýy²â}´ã€³ß†¶Ý€­ÒsžÀu¡Å}¨Ì~©Î«Ï†±Õƒ®Ò‚®Ñ†³Ô–Ãâ”À܉µÐ¹Ô½Ù‘¾Ü„³×t¥Ïp¢În¡Ëe™Äc˜ÄižÄo£Çr¦Îf›Å]’½R‡±K¬Hz¦Hp•@]y3J(>5MJd{x’Ce)>$5;9 %O%Z"dœbœd'cœ.`š'`œ^š]”)jšB§]޵Y…«Iu›7c‹Bl 6a 5`6_4\0Z +2]8e6c2\ .V©¶Ä5^2]0\4`;e5^ 1Y.U3Y4Y5[ 3]6a 4_8c8c=h<f3\1Z3\5^4]5^@l<[…A\‚5Ns<d,Y +2`GrQ{¥‚©Ìz˜´Yl|DMSFJLQSSSQPC<;KBC^WX`\`[hoEac*==**,1,+B:7WRSƒ”¡—»Ó†­Åv—§e‚Ž0s³*n«-r¬Eˆ¿b›ÆR©;d +S%J$Ii‡°ÐNr“ @_ +*H)K&R{UŒ¹Q…·P~³V„·Yˆ·V†±U†­^µYŒ¸Cv¥6i˜<ožS†µ^’Às§Îu¬Îµ×r¨Í[‘»R‡µEzª=u¦6o &^$\C{¬W½^”¾mœ¿nœ¼p¾w¥Æ†´Õ޼ߒÀ匷ÞgŠ«:Tm)?�*3 6O„–„œ1Uv+7M/32 "EU­^—ÉJнKŒ½Y½\Š·K±:t¨B|­c˜Â~¯Òƒ°Ò“¿àšÆçy¥Í>i•Ft 8f6a6`5a1]0]4c 8c2Z§·Å0Y.X3^8d4a0]2^2]5_ 7`9b7b8c:e>i9d 4_2\2Z2Z2Z3[5] +;cBj;a .R+O/W =k3g–_¼‰·â¸ßkЦQds[diGQW2<C68<HFHjgjppwMMZ.8JHL9;?=Fcbdwusjaaclrv”§]‚™Nm|GakTX‘[’(f›Cw¨DqŸ=j)T�'OKoS†©ClŽ*On2P&H:c?u§[‹¿gÃf‘Äc’Ã]¿_”ÃZ“ÁRÂH…»7s©/jŸ6q¥7q¥8rŸ;tš>vAy£I€®QˆºN…¹H‚µ@{¯4n£.hœ7p£;t¦9r£=v¤;t¡6o0i–:s K„²Oƒ°eµ[z™2H`%8+/�6i}† (Mn7CY 3- (]v’‡¬Î}©Ìs¡Ál™»i™¿`“ÀU‹»lžÌ€¬Õ‡¯Ó}«Îq£Èi™Á]Œ·P}«Iu¦N{­2d’Cr :j +6g 4e.`2^8_¦·Å/X/X2\ 1\3a8g:h7e9g@m7c 2] 6a 5` 4_ +3^.Y-V1X3[�1Y�0W�/W�1X�0U1TBc,Y{@uš<x£AzªFy¨Bs£;g‘NmŠl}‹\bh)5? 1<7@G^afqszKQ\"3"*A9r|GrwhiscglDHJ#$'>Z4VuHh€ZtˆY޾T¹J‡´E‚¯Q‚±Jv¡>c+M)N)U_‘¾Kƒ®%^‚ <Z�/N2[Nƒ+^˜)^š(]˜)_š1h¤<s¯E}·SŒ¼^–Ár§Î‰»ß޼ߓ¿à–ÀâœÁåÂåœÁãÂàœÁáÂâœÃä–Àäºß†±×‚®Ò~«Ñe“Á?vª7p¦4m£-fœ.g)b™WM=]‚7CX $0& +,1?[/r—#No<Oc .?, %,7W.\„1c'[ˆ']+dš0i (a˜!Z!Y%]“!`—a™+k¢8t©;t§:p¢<p¡Ar¦8hž&U‹E{ :p7m5d 6]©¸Æ 5\ +6] +6^ +5] 6_;e=g 8b 7` 5_3]3^3^2]/Z�/Z�0[/Y1Y/W0X�0X1Y5]<b9bˆbŽ´n›Àg—½d•¾g—ÁM¬$a”)_ŽYu’px‡CGS$.:=JTS^hNWa>GP%/:*0:V]kd–¬Q|‡CQN'16$ ",?TjX|›e‹ªnªn¡ÍiŸÈb›Æ`šÇh—Æ[‡±Be,M*OFq@o¢5l¡,e’Di�-N�-Q <f"U‡"YŽ#[%]’&]’"YŽ%[6g•AqœGw¡Csž9i•9i–:i–:f”<i—:g•2^Œ0]Š3`Ž2b’+]Ž0_Ž0]Š/Y„3[ƒ2Zƒ0]Œ-[Œ7f—Ix©Zˆ¹O~¯4g˜1e‘De…/=P%)7$(;661P*cŒ&Qs<Qd)6H ./ 4-Nnt¢Ëp¤ÓhÌO„¶0gœ*a—&]“Q‡Q‡RˆRŠXWŽWŒVˆ!X‰#X‡(Yˆ4d“5e”0`"R‚HxFsDp¬½Ì@k =h ;g +:e9d :f +:f8d6a2]�/[�0[�0\1\�0[�1\2]2\;dHq/Y‚=h’FrœIuŸDrœ<m˜)[ˆ!T‚Tƒ!W‡Q{ GnS‚,eUtŒXcn@HSEO[ValALV$/90;DHR[]fnez…N§(bp(&!*/5DQNRadlm€’o‘«b†£Oq‰&W‡,^Ž5h—Cu¥Mx¨Enš?d,N)N(OzWƒ·Bv±8l¢R5Z +8Z 5U8j‘XŽ»dšÇn¤Ñ]’¿T‰¶Oƒ¯P|¨U¬S‚°As§'\•RŒO‰RŠS‹S‹VŽTŒVŽV!]—<s©N¯aŒ¶q•ºzœ¿~¡Å¤Ã‰­Î•ºÞ›Àç”¹àƒ¯Õƒ´Ô\™&8M"69< 78YR}@c0DW0>O"6'+#?\z¦Í±Þz¬Ún ÏW‰ºEw©>p¡8jœ>p¡?q£BxªF°D|­K‚²Nƒ³U‰¹]‘¾g™Âo¡Ét¥Îp¢Êe–¿\¶Tˆ´H¯·ÊÛT„SƒT„U… U„SM|JyHvFtCp?j +;f5`6a :eHs.Z…Sz¥j’½m•À`ˆ³T|§Pz¥Bv£,e”JzCtL}L~Am +Io\‡$[~CarZgnYgqTal?JT",6'1;[enr{…Zhp.Wcd\n0GINVdlr‚yx~gjpGTc5Qg@X/DbÁj–Çw¢Ò}§×|¢Ôi»Dj*M*P0TdÀ>o¦*[‘'V‰An:^.M@d5h’;m˜Lª]ºb•Àa’¾[ˆµY†´X‰¸K€¶/h¡TMˆO…Q‡Q‡SŠ#Y)_•(`—*b˜5gšGs¡\ƒ«hŠ®y˜ºƒ¢Ãˆ§Èƒ¢Ãx—¸p²s’µp–¸i—µUy”$;T%>6467[#Q~'Ko4G[5DU':!&-H0X}9g‘ApšQ~©Y…²T€­Bm›2^‹2]‹Gs bº^·T„®T…±[º`“Á]½X‰³S„®O€©Hy¢:l•=n˜<pœ1g–²ÅÖQ€OM}L{O|(Xƒ1aŒ*Z…&W‚)Y„-^‰1b7h“8i”8i•5f’>ošKy£b¸t¡Ës ÉZ‡°DqšEsF}©7t  ]ŠX†Xˆ K{FrY€W€DaJ_kt}cpz7ER(2-8BT^guˆcmv/>F 9FqD‰›s‰Œv}‹djzHIM&,/ , &:4H7c•<d—Bg›Il¡Dfš?c=d +.R*Q!BqV~­W‡±Y‰·Wƒ¸.WŒ6d)O 8b*X‰.]Ž3b“+Z‹NNMM~J{K{W‡.e•S…³sžÊtžÉj”Àl–Âu Ë}¦ÒvŸÈo•¾všÂ†©Ï–¸Ü™¹ÝŸ¾á½á˜¸Ýœ½á Áå½á˜¸Ü‰­Ów ÆRv™7U&?+ 8C\ƒJr¡@`†@Re4DU(: ( 'A)Ps3_†=i’Al”Cj”LsT{¥Qw¡Rx£a‡±k´i²`ˆ®[‡¯Ix¢-_‹$V„ P P!Q‚ P P&V‡*Y‡.^ˆ¹ÊÙJz¤V†±ZŠ´c’¼q›ÁxŸÃ„«Ï{¢Æb‰®Mt˜LvœT…¯]Žºa’½U‡²Fw£>p›7k“1h-eŠ/f‹4j7m“ByžF~£7o–+eŒ%^‡ Fo@jQz"W€Ai C_oyƒ‡‡ŒLS`(4+5?U_hfpyV_h4=F*1,]hV©Äl«½t…ˆOT^!)2  &=NZdy‰~“¤§Õ„¨Ø‚£Ô‚¡Ó„¤Ôs”Á?h +R ,V8[Šl•¿a“·W‡´Al¢)Pˆ8i +-V9gK€-\‘Hw¬N~³Ix®Bs¨&b•PM|HuMx+^‡R§wœÄ}¡É}¢Ê£Ë{ŸÇ{ Ç…¦ËŒ«Î¯Ó’³Ø–¸Þ–¹ß™½äžÃé Äê Äê Åë–»ás˜½_†®X€ªPt›%Bb 6(&'0"8MgŽk“ÃušÃSj…-?S'9((0Jv™½Š³Ü޹ä¹äµßŽ³Ý‘·áµÞµß“¹â”¹Ý‚¨ËgµS§;i“)Z…%W†OƒN„N„O…!Rˆ$TŠ-Y†0W|¹ÇÓPt˜dˆ«p“µ|žÀ‹©È•±Ï•²ÐЧłŸ½x•²fˆ©Drš3b‹$S}Al9d:f;c�<a�=a�=b�>c�;`�<`=a =aDi @e;`In)^…"U}+ZOk†‚ˆ’ols.1>*2>HQYS[c8AH!+3'2;AR[b“¡j½ÔSŠ™BJO %"&%DJK`hm‹˜¢¯ÀΪ½Ë‘±Õ­Ñ}œÀy˜¼z˜½a€§:d -Y /^(Rƒ6f–)^Œ)[Ž1]’5[Œ?f6T=dGyK~Q„-_‘8jœGy«N³Dx©;n 4g˜-`‘(Z‹%Wˆ$U†!RƒOM~IzDuKz+X†5b9f•;i—Ft¢e‘¿„®Ö¶Ü¸ß‰³Ù„®Ôx¢Èm˜¾l—»g®3Qm "8 '- :#Fn%U…%XŠ%Nz*Dc#0C!-& ;BbˆRy¦MwªBmž?j—7b;f’?j–2]Š.Y†.\ˆ%V#T%W‚$V‚'Y…)[‰!T…N€N€M"U‡([Bm™Z}¢ÍØå}š»Ž§ÅŸ¶Ï¥¹Ñ¦»Ö®ÃÝ·Ìä³Èß®ÃÛ£¸Ò“®Êt½Bn‘Ag8`;e;h<g�=e�=e�=e�=e�=e�=e�<dAh +Dj9^ @fRwGl6YFcSoƒm|‰JQ\5:FOU\NSW).0 '18Yivn‰šd¤¹;™¨M\#$0223PXZjkp~€ƒ‰Œ‰’š–¥±{‹˜¡Â瘹ްհԗ²Õx’µ8].V1Qz\~©;b,Z‚/Z‡FkšLl—4Pr8Q=_!Lw&Q}'R~0[‡:e‘Al—>i”;f’Cn™7b.Y…'R}&Q}2]ˆ8c.Y…$P{$O{"Mx Hs"Hq(Ox0V4Zƒ3Y‚)Ox-U|.V}-U|)Qx*Ry)Qx#Lr$Mr/Tu'D` +5& +#)D-Qx&S#U†#Nz5St1D[+:&3:[JsL| O€$O|"M{#N{'RIvIvMy Pz Oz Pz$T~)Xƒ'W‚IwGv$S‚,[‹.]Œ)Yˆ([Œ&[޲ÄÖ"Rƒ0]Œ8cDm–Oo”Hf‰A_‚Db„>\~2Ps*LnEf =_7[9_�;a�;c�:b:a:a:a:a:a:a;a Ag:_8\KnIl5X =a/WsKdvP^kKS]RXb\ck/5; +BOZj^|‘:~’ hw L\?LZkmr“™ž‡Š‘uyyX]`8?EEQ[8HS‰­Ó´Ú•¹ß–¹ßž¸Üs‹®!9\-Ph‚¦©Î‰¦Ê³Ô€£ÉnŒ·r޶`zš8P-KiiŒ±jŒ²mµr•ºmµhаeˆ­g‰¯gНd†¬c†«iŒ±t–¼} Åƒ¦Ë…§Í…¨Í…¨Í‡©Î‹¬ÏŒ«Î¬Ï‘°Ó“²Õ‘°Ò‚£Æv›ÁxžÆvœÃfŒ³Tz¡Pu[€§iŽ´kŒ¯1Mj1&4LeŠ¬Ñˆ±Ü®ÛrœÆVxœ)Fc2E�,�,&A +8\:g >nCp!LyHuFsHuHuKuJsEnDmGpKt%R{ JuBm=g>h@jIs"O}Iz®¿ÐL}M|DsDsJu IsEp8c 5` +3^2[�4X8[�8[�8\�9^�8]7]5\4\5\4\6]6^ 9` +;`2W@cHk5W1T#Np4Vp6L]O\ggpwaip@EM :BKp€Žkƒ˜5TlK^cs@‚’qŒ˜’•“–žipv388 &.2?I=dŒBi‘LršW}¥mµSp— (N1Lp˜²Ô§¿á¥Ààž¿Þ–¸ÝŠªÔˆ§Ðy—º#A^/Nnm³a‚§Jk9[6X|8Y}?a…Pr–\}¡h‰­p’¶{œÁ’´Ø™ºßš¼à™ºß’´Ø“´Ù–¸Ü›»Ýž¼Ýž¼Ýž¼Ý—µÖŒªË‰§Êƒ¤Ë¡ÊЬՓµÝ–¸á™»ã˜¹â—¶ß”²ÖId4'"%?X`€¥`„«Qx¡9`Š)Ow%Lp=W�/�+29Z@m6g2_1^2_ +5b 8e7dCl"Nt&Qx!Ms Kr#Ou+Tz9]ƒDhŽLp–X|¢a…«kµt”·q®ËÕápްo³Qq–3V|,V‚,X‡+W…$P&R€Cr=k >g:a:`:_7[ >a@eBiKq)U|,XEk 6]:`2W;^/Wz6]-RtIp’gŒ­]y“N`pkvy‚†NV[!$)==B`dm†“¢u‹¡Hh€CsƒY‘¤z³Ã…¨²ˆc`i,49 +  ?EJ`lt2[…:dŽ=f‘9cU~¬Ah–*W;\…mŒ³x”¹u“¶W}ž9^‡&K{%Jz Gq>b4Y>f!Fn*Ow.S{,Qy(MuDlAj&Kt0U}1V~6[ƒ>cŒEj’Y§b‡¯k¸l‘¹gŒ´iŒ²g‰­_¥TušDeŠ?a…Tušhˆ±~žÈ‚¢Ëy™Â†¦Ï­Öˆ¦Ð‘­Ö™´ÙOi†1�%�"'C\]|žDd‰9[‚.S|=j:f@b8, .?1`2d3` +5b:h!Mz,X…9c^‡®q™¾f³QzžR{ o—¼…«Ï“´×›ºÜ¼ß¡Àã¤Ãæ¢Á䡽ܤ¼ÚÖßêqޝ\|¡BeŒ/T}$Ny(T€&R~$O{%P}%P}"O|JyFsJu!Iq&KqEiSxœW~£b‰®n•»sšÀ`‡­]‚§^ƒ§Z¢i¯f‰ª@aƒFg‡kŒ­r‘²k„›pŽƒ”jsv)34" E;;e]_][ackw^p…\u‹‡ ®µÉ”¾ÎmŽ•KDL8/5'(!%&?@>hihˆ‹Ž ©²z¡ÌeޏS}§Ku Fs¡Gu4`Uw¡jˆ°f€¦a|ŸUu˜Gh7\Š+U…(Uƒ"R}=f#LuIqšPv Z|¨e…±d„°Uz¤3Z„-T~*Q{'Nx8_ˆMtRw Uz£Rw¡Z©_…®W|¦Vz£SvPs›TwžZ}¥Twže‡¯ È‘¯×”²Ú’±Ù’°ØŒ«ÓŠ¦Î¨Ï‡¡ÅB[z3�&�%4QEgAc‰0T{Cm8e 9gAh*J&@*C;1Z?lBnAlEqFp"Is"Is&Nv.V}0X€,T|BjBj$Kr*Os/Sw0Sw4V{<\Ba‡AbˆDf¸ÅÓ#JtFr LzKzDp?k=hAmDpBmCpHyJzJy$Ky*My)Ku'Js$Jr#Iq#Iq#Iq'Lt5Z€6Z=_‚Eg‹6Wy+KlDd…Ji‰1Pq-C_jvˆŽ–›OXX!511dWUc[Z77;JS_dt‡…˜­¬»Ë§²Ål„’<RW! .'+EKLikl‚‚Ÿžž¦§©·¾ÄLo˜Fl”Mv^‰¯Bn’ 5Y 1Us“¶¯Èê±Äæ³Ää®Á᥽ްÕn—¿Xж@w¥GpDiEl’UvŸiƒ¯v‰·y‹¹u”¾`„¬Z}¥Fi’;_‡Tx h‹³kŒµjŠ´q’¼~žÈŽ®Ø‘±Ü‘²ÛŽ¯ØŽ¯Ø±Ú°Ù’²Ü’³Û“´Ø°ÓŽ®Ò®Ò‹¬Ï®Ñ’¯Ñ•¯Î™¸?Xw8/, +'I!HqCl=f=fEn*Px*Kn:[0P/N +!?,J*KnFq@kAk&Mw,S|&Lu!IsDpEq%Ny%OzEp=h <e ;d:d:f;h9g7d9d°¾Î JuEp"Lx0Y„*N{ Cp<i Cp Cp;i>j?gCj&Py,R|3W6W‚3Y„3]ˆ.XƒGr?jCmFpBg7\€7Z>`'IjLmŽ;^|"CcCX{„¨zƒ†4><)1fae{pm@>> Q`k•¦¸ÀÒæÀÓæš¨·DKS!%""%RSW„…‡¥¤¦¥¥©˜—š„‚‚x{q”¼Nt›*Qx 7]-R/S+NHo‘†©Ê‚ À}™¸mˆ§Ut”@eˆ$RxPy'a‹Ou3V/S6]>f"@j">i$Fo"EmAi;c8`9a7a 2_ 1^5bDq7]ŠRw¤g‰´o¸v–¿zšÃy™Âs“¼d„­YzžTv™WyœYzTu˜Vwšb€¢u®uŒªAUp30-*G>[|If‡If‡EbƒDa‚MiˆNc8Mi2N,I >/N9[€-Y„ LxJvDpIv%O|$Iq'Hm)Jp*Kp)Jp:[€/QvDh$Im)Lq)Jo-Kr*Fm AiBk¬ºÉDmEn Hq'Nw.S})Lv%Hr*Mx,Oz=`‹d…ª›µŽ¦¾²Ë§¹Ô«ºÕš©Åv‘´V}¦?g(OxFo Hp>f<a*Nr)Lo Bd4UwCd…,Nl(IhQh‹etS]b/76AGNtjlZLH"q~†°¾Í¼ÊÛš©¹gr~>DK?@Cbac’‘’°®¯°®±‹Œ‘a`cBAA(*->aŠBi7]:`4\�0X4Z<_Df"IiDd!Cd!EgBeBfMsKqFk ?bAf@e>d@g#Go+Nv+NvBj8`5]4\7a5b5c;iBpEtEsBm(HqAaŠ_¨jгZz¤@a‰Bb‡Op“Yzh‰­yš½ Ä ÂªÉŽ£½KYn"-@2 12E]›®Ç¬¿Ø¯ÂÛ®ÁÛ¬¿Ø®¿ØµÄÙ{‰Ÿ->U(A 92NsŠ¥yªp‡¤F_}%@_(Ef1Nq/Kk5On3Nm-Hg+Fd0Kj/Ji.Ih1Lk5On<Vu:Ts4Nm1Ps.Sz´ÁÏ&Kr$Ip$Ip%Jq5X€9\„6Y3V}.Qx3V~Ln’RpŒKf‚c|˜z‘®ˆ›¹„–µ[vš+Pw El-Ry+Pw)Nt!Fk"Gk+Os@c!Ce:\}.Nn9T4Vq[u˜DWr6DKCJJbci~qsI:5 /56œ¤¹ÆÓžªºjvƒOXcZahnqužµ³³­«¬„„ˆQSX''* =f@h=c8_8d +4`:eDmBhEh"Gk*Ip-Mt.Sx)Qw Kr Ns&Rx%Pu Kq<b.U*Q4[AiAiAiBj&Iq Dl Bk#Dn%Fp)Jt&Gq#Dn!Bl$En @i6_ @i5U8X+Ks(Im!Be!Be Be.Or;\Klu°’£ºLRa $1,/Se}½Íä¿Ïæ¾Îå¼Ìã¹Éá¹Éà¼Í䥳ÉM[p&:"5.7I®´ÂÐÑÛÇÊ×´»Ë©»Žž´†™²}•²u®qŒªx’±u®D^}.HfF\|f}‘©ÉªÉ}™·cŸHiŠ2Sy±½Ê<b?e)Kq1Sy3W|5Y~4W|$Gl@e>c<aGnDlCl#Is&Jt7Xƒ;]…0Qw#Ej=c:`4Y8\#Fj%Il=`0Rt7Xy:Z6O;^uJhˆ)@\5EOcjjojpWJL PV[§ŽžP_p3@MAMXx‚Œ §¯³¶º¬«¬zxyFGL" + +&&(&Ir%Ks IpDl=n!?r#Br)Iw%Gq Ck&Fo2JwF^Šiƒ®u‘ºt’º{šÁl‹´FeLl•Xy¢Vx Y|¤Hl”/S{&Iq)Lt*Nv)Lu&Iq*Jp5Nq6Op5Np/Hj/Hj1Jl+Hn?h5^2[6`<e<d?c#Eh#Dh'Il1Ru+Lo"Dh$@`HUiDDN0.7- 4Vj„|ާ|§€’ªƒ•®“¥¾™­Ç”«È•ªÄ`mƒ'-=*)21+0—ž¥¶—£¸ž¶j‚žCa‚4Tx'Gi'Fh"Ac!@b >`=_2Orh¤u±\wš?_€'KkDc=^=`±½É'Gk.Or1Qu)Jm"EhBd;]2T7Y<^=`FkIo#Jq/S{5V€2Pz2Qw+Kn!Ad&Fi,Ko&Fh,Lm,Os:]3V/Oq&Gh +)I%F^Il€5Uu.LCTa„‡mci3&* + 58<ly‚}žI^q/C.=KZi†•¤¦³¿ ¨¯xz}HHJ 411__`@_†>^…<^„<^…3N{2a7dYu qޏu“»‚ơΡΑªÔ‡¤Ì_€¥Jk*Ho)RNi’’­×ªÔ’ªÔŽ§Ñ„¡ÉžÆ ÈÅd‚ª:X€0Kq<PrMa‚bv—dw™[oXl^r™cx¡g}¤f{¡k¤v®h€¡PlMj‹c€¡w”µœ½b€ 6Wy%Ed7G^/1B+ .,G;Xv>Xw.Hg'Ba(Cb7Rq<Xx6V{2Op<Pk1;M44?)"(7>M*Fe%De?b Bg@h En>c4V9[>`%Fi*Ln#Cf(Dh3Os7Ux5Ux&IkAb=`3W¯¹Ç+Hm-Ko-Jn/Mq.Nq&Gj%Fi?b?b#Dg Bd8X;[;\"Ce-Ln2Ps2Ps5Ux,Ko)Il(Gk<^'Eh-Mo>`+Kl9Xy7W (H0Kf<Xo2P "?FYi†Ž•PMSSW^v‚Ž[m}'9N 47GZq‚“™©¹ ®ºpzƒCHM  $)EFHlii”””‘©Ï’«Ñ˜°×ž¶ÜŽ©Î6Rw,Qq²š¶Û—³ØœµÜ ³Ýž´Ýš¶ÝŒ±ÕT Ef +0S5Rx†£Ê™±Ú›¯Ù­Ø­Ø™¯Ø—¯Ø˜¯Øš±Ú™°Ù•¬Õ¦Í£È”¨Íœ±Õž²×Ÿ´Ù¡µÚ¥³Ú©³Ù¬µÙ®¸×´¿Ú¹ÅÝ·ÅܴЀ™·m†¤[t’PjˆE^|3Ro/Pk7Id&+E43.K@c7\6Z5Y8]!Cg)Lr*Py'Ip+Gg/B[+6I$1&8M!Ef#Fh ?a*Fh2Jl0Gi$Aa=\9Y:Y"Cc"Dc1Qp7Uu'De(Ef'Dd=]6V9]6]¬·Ä4[8_!=d!=d">e*Fm">e5\7^">e&Dj>b5Y4Y9]>bCg Ch!Ag<b;a3X/T;_5X,N7Rt[v—7Rq3Ml^w“Sj† 8T'@Yaw‰w…+27@;=vx€{…’M[m!0B0?Pm|£³Ä®¼ËŒ˜£Zdm$.5-/0MQTuvx¡ŸŸ¿¿À›³Ùœ´Úœ´ÚœµÛœ·ÜQm’!FC_„˜´Ù™µÚ”®Ó•ªÑŽ¥Ì„¡Æy›¾y ÁR}%Hkh„©ˆ¢È~–¼}’¹uˆ°fy¡[r™Yq—d|¢y‘·”¬Òš²ØŸ¶Û¢¶Ù¢¶Ù ´×¡µØ£·Ú¥¹Ü«ºÝ¯¼Þ²¿àµÃá¶Äß¹Ç଼Ör‰¦1Jh&?]/Hg6Om;Tr1Lg6Mf?Ka*-@&*<0+C\3Rq(Hl'Gj%Ei<_6Y3W8^>b'Ba6Ic&3G."4I(If)Hf"?^%?`*Bd,Df!?_#Ed Aa;[!Cb"Cb1Rq*Gg4T2R1R.N +'H +'I 'Lª´Á,Q,Q5Z8]9^'Ch">c;`(Di.Ko-Jn/Lp0Lq*Fk*Fk)Fj+Gl/Mq&Gk@c"Cf @c @a7Vw-Kk<[6Rq4Pm#>\A\xZsŽ1Hc)C4Leavˆ[it$)!TPRrt|Wan'6F,=N]mœ®´ÃÔ¨¶ÄwƒŽGQ[+5=-25^__€„†§ª¬ºº»ÆÇɵ۞¶ÜŸ·Ýž·ÝŸºß^zŸ,Q9_A]‚B^ƒA[€<Sv,Dg:\9Z&Gg+Nm1No6Nq+Be'?b&>a2Jm7Nq%>a6Y9Qtl„§š²Õœ´×Ÿ¶Ø¢¶×¡µÕŸ´Ôž³Óž³Ó±Òœ®Ì•¥Âº„”°v†¢q‚žn€VnŒ6Pn,Ec)B`(A_)B`,C^0@W8BT'-:$2'9.?W,Ec&Cd%Bc+Gh$Ab;\<] ?b$Bc&?]&:T(7M 4 1F1Jb;UoAZw<Tt;Sv4Mq$Cc!Cb"Cb>]?^;[8X5U8X9Y;[;[ *J A$E©³¾ )J-O;\-Jk/Lm&Cd*Gh*Gh0Mn.Kl">_*Be2Km:Su<Tw1Jm+Df,Hj'Hh'Ih)Kk'Hg*Ki.Mk9V<X.Lg5P)C+F_7Oi %?99QiTi|AOY#212hfg`el.9F!&6Tdt„“¢ƒ’Ÿ^kw;FR+5?7@IZ_c„‡‡§­±¿ÅÈ»½¿³µ·Ÿ¸Þ—¯Õ‚šÀ\ušC^„(Dj!=b6[8]9_:].Gf0Ih-Ge/Ih1Lj3NlH_~G[|3Hh-Ee&@^&B`.Ki,Fe2JjUnd}œb{šaz™]t’Ti…OeUj†Qf‚F[w>To:Ng6Ia6Ib2E`*=['9Y&9Y 8V8V7U(A_(A_'@^CXuHWrBPe,:"18F[IXs4Ig+Dc$>\6U 9X 9X#=\,Gf6Pn7Ok;Pj.@X%<>Oc]p‚Ocy>Tn0Gf*Ce8];]"Dc-Nm(Ih"Dc@_%Ed'Ee5U7W<\0P &F-K1N¬¶Á8U%B`(Fc&Da*Ge*He&Da;X#A^'Db;X2O+H6S<Y/M/L2O -I)E(D&B/J.H8/H!<V#; #:0Ka+D[4-HG^vQfx3BL!'FFEnmnOU\%0 ++:L\xŠ™ªw‡“HVb,8D*3?OWbx…ž¥¨¶ÁǼÅʪ­°µÜ€˜¾Wo•E^ƒ;V{+Gl7\5Z4Y4Z:\'B_6Pm7Pn0Ge'>\0O!3S):Z"6U5R">Z)Je%F`%@\+Eb#<Y7T";X%?\2Je6Ld5KdCYqJ`xBXp=Sk2I^0H[3J`9Oi4Jh-Ac%;]$<[+Db(A_5S/M1O0P!4T+AZ +!5 +!54Ic5Hh,Aa%<[+Ca5Lj1Ig.Fd2Jh:SpPh†l‚ž•©Ãk˜*CQbu™§¶n8Kc5S4W$@e+Jl,Ml:[z"Cb=\:Y>]&Cc8X0P-M &F4T"@]#A]³¾È$B^=Y<W6R;W!?Z7R *F +(D &B%@&@$=#<#<�$<�$=";"<$>#>"< +D +*C 88O;R"97LE_t2Lc+E6Ni_wTi{2@L-4:YZZjll:BH ',:Vkz‰œª ¬Zju"0; " )5U]iŒ•ª¶¼¼ËÔ³¿ÆŒ‘’iji–¯Ô–®Ó”¬Ñ¨ÍލÊoŠ«!<]8Y#>^)De!=\8U6S7U!9X'=]'<\&?]:W8T:V$B^#C_5R0O4T4T.N.O":[":Y6R,D_6Ni4Lg2Jf-E`3Id,B\5KfCYvI^~Sh‰Pf‡HcNj‡Fa~,Ea!9S#:T+A\&=X*B[ #91I8Pl2Ih5Ml7Pn+Ca&>\";Y/Hf5Pm4Sl@YpQcyXhI_z%Dc0H<L\,>P%:P)@\&>_5W@^B](Kg(If'Ec#?] 9Y3Gi7Km(?`6V.M *I +'C )C«µ¾-F +D'?$; 9 ";'B(D 'D +%C (E +(C +)D ,F (C+F-H +)E -K ,J&D%B-J-H4L:Sj=Vn&AY=YsUrŒ6Pi!7NI^tbuˆP_n6@J>DJaacaac&,1+<Jl£´{œAR_(5!-=GRow‚ž¥®¹Âdz½Ä–ž¤hloBCDAY}G_ƒMe‰Jb…AZy3Lj&?]'@^-Fd1Jh.He"@[">Z!;X"8V/Cb2Dd/Fe)Ec!=[ =[ =[$C`"@^9[4X$=`7[!9].Gk,Ef%>\8V!;Y6T6T*Ca5Ml)?_+Bb1Hh.Ee6V1P7V A_#A^">Y+D](@X(@W-G]9Q8 #=4N5P9V8W-L2Q7V'@_%B`A[,H_;Lb5F\3Pk5d„7Q 9K4Nb1Lb8Tn3Ol%A`C^=W8S6R0M&E"B#E'H'H(H 'E%B&A/H¬·À0I1K6P7P$:R';R#9R8R6R,K,K3R3R0P!6U0O.M %E )K$F 'I,M8X-K':P@Pf4G^%:S>VoGa|5N5JYljyˆOZf<DMJNUhinUTX" +BLWzˆ–ž®kyˆ0=K)#-7airœ¢©ÆÊÏÈËϧ«¯|€…RUY"$&":[*Bd(@a%>^!:Y+Db/Hg.Ge2Ki5Nm3Lg4Kb<Rh8Kb8H`8E^=Hb>Ee?Fi8Ce*<\.L &B +)E +$D !B &G.O2S#;\(Aa3Lj,Ec&@^8V3Q1P*G,H4P <X-Ie)Ea =Z:[?`&Gf&Eb,Hb7Rk:Sm 8T7�25*C[>XpD]wAYu0Id!9U4P$<X#=Y9W!;X+A].Hb/Wq:sNe%91E8O5O-I&B#?%A +(D(E0N0N2P4R6S3P2O$A] ?Z6O5L¬µ¾'B*G#+J&D!2I/C &< +%<&?%@ (E&E(H*I,K,K!6U.M &F (H+K/N2Q +!>3AVhs†VbvANc\jWf|&8M1EK]oZixEP\FMVV[cgimLMP #)~ˆ¨¬²¥©¯qw}>CI049Y]a—šžÒÔ×ìíðÝÞá—š^bf:>A%>\2P0N0N4R4S+I,J#<Z7Pn>Vq=Rf>Qe>Nc?Kb@JaMVm\\z]Z}TWwBLj.B]6N0H &B 'E0N,Ec=Vt<Us4Mk0Ig)B`-Fd/Hf&?]#=Z%@Z<T2J0H2J1I3M9W6T%C`-Id4Mf-D[(A/.++*?OOds`s‚k{Œev‡YizXhyP`q7HZ(;P%8P4O0K!Mf0p‡Xo?X.G%?� ;#> +'C'E'E3Q'?^3Lj1Ki&?\,D^-F_":S'A%?&@ 71¦­µ#=8;XIEd4.M*?+< $7 5!8#; &A'E&E#B(G/O'F)H +"A*I-L4S'>[+G$/FV_tV_sW`sx€“pvˆ>K^8MbK]oIWh@KXJQZbgodhl>@C +,,3µ´¹çåæ×ÕÒ–”’a_^XVU|zy·¶µáßÞìëêÐÏБ“LOR),/  \ No newline at end of file diff --git a/Resources/Ppm/spheres.ppm b/Resources/Ppm/spheres.ppm new file mode 100755 index 0000000..1c10861 Binary files /dev/null and b/Resources/Ppm/spheres.ppm differ diff --git a/Resources/Ppm/spheres2.ppm b/Resources/Ppm/spheres2.ppm new file mode 100755 index 0000000..5a2b679 Binary files /dev/null and b/Resources/Ppm/spheres2.ppm differ diff --git a/Resources/Bmp/shapes.txt b/Resources/Shapes/shapes.txt similarity index 100% rename from Resources/Bmp/shapes.txt rename to Resources/Shapes/shapes.txt diff --git a/Source/3rd Party/GPC/gpc.pas b/Source/3rd Party/GPC/GPC.pas similarity index 96% rename from Source/3rd Party/GPC/gpc.pas rename to Source/3rd Party/GPC/GPC.pas index 1e4e331..b473b72 100644 --- a/Source/3rd Party/GPC/gpc.pas +++ b/Source/3rd Party/GPC/GPC.pas @@ -38,8 +38,8 @@ interface -uses - Windows; +//uses +// Windows; // =========================================================================== // Constants diff --git a/Source/3rd Party/GPC/gpc.pas.old b/Source/3rd Party/GPC/gpc.pas.old deleted file mode 100644 index ea4bf58..0000000 --- a/Source/3rd Party/GPC/gpc.pas.old +++ /dev/null @@ -1,2063 +0,0 @@ -unit GPC; - -(* - =========================================================================== - - Project: Generic Polygon Clipper - - A new algorithm for calculating the difference, intersection, - exclusive-or or union of arbitrary polygon sets. - - File: gpc.pas - Author: Alan Murta (gpc@cs.man.ac.uk) - Version: 2.30 - Date: 17th October 1998 - - Pascal port by: Stefan Schedel (Stefan.Schedel@loewe.de) - - Copyright: (C) 1997, Advanced Interfaces Group, University of Manchester. - All rights reserved. - - This software may be freely copied, modified, and redistributed - provided that this copyright notice is preserved on all copies. - The intellectual property rights of the algorithms used reside - with the University of Manchester Advanced Interfaces Group. - - You may not distribute this software, in whole or in part, as - part of any commercial product without the express consent of - the author. - - There is no warranty or other guarantee of fitness of this - software for any purpose. It is provided solely "as is". - - =========================================================================== -*) - -interface - -uses - Windows; -// =========================================================================== -// Constants -// =========================================================================== - -const - Version = 'GPC_VERSION "2.30"'; - GPC_EPSILON: Double = 2.2204460492503131E-16; { from float.h } - - // =========================================================================== - // Public Data Types - // =========================================================================== - -type - - Tgpc_op = { Set operation type } - (GPC_DIFF, { Difference } - GPC_INT, { Intersection } - GPC_XOR, { Exclusive or } - GPC_UNION { Union } - ); - - Tgpc_vertex = record { Polygon vertex structure } - X: Double; { Vertex x component } - Y: Double; { vertex y component } - end; - - Pgpc_vertex_array = ^Tgpc_vertex_array; { Helper Type for indexing } - Tgpc_vertex_array = array [0..MaxInt div SizeOf(Tgpc_vertex) - 1] - of Tgpc_vertex; - - Pgpc_vertex_list = ^Tgpc_vertex_list; { Vertex list structure } - - Tgpc_vertex_list = record - NumVertices: Integer; { Number of vertices in list } - Vertex: Pgpc_vertex_array; { Vertex array pointer } - end; - - PIntegerArray = ^TIntegerArray; - TIntegerArray = array [0..MaxInt div SizeOf(Integer) - 1] of Integer; - - Pgpc_vertex_list_array = ^Tgpc_vertex_list_array; { Helper Type for indexing } - Tgpc_vertex_list_array = array [0..MaxInt div SizeOf(Tgpc_vertex) - 1] - of Tgpc_vertex_list; - - Pgpc_polygon = ^Tgpc_polygon; - - Tgpc_polygon = record { Polygon set structure } - Num_contours: Integer; { Number of contours in polygon } - Hole: PIntegerArray; { Hole / external contour flags } - Contour: Pgpc_vertex_list_array; { Contour array pointer } - end; - - Pgpc_tristrip = ^Tgpc_tristrip; { Tristrip set structure } - - Tgpc_tristrip = record - Num_strips: Integer; { Number of tristrips } - Strip: Pgpc_vertex_list_array; { Tristrip array pointer } - end; - - - - // =========================================================================== - // Public Function Prototypes - // =========================================================================== - -procedure Gpc_read_polygon(var F: Text; P: Pgpc_polygon); - -procedure Gpc_write_polygon(var F: Text; P: Pgpc_polygon); - -procedure Gpc_add_contour(Polygon: Pgpc_polygon; Contour: Pgpc_vertex_list; - Hole: Integer); - -procedure Gpc_polygon_clip(Set_operation: Tgpc_op; - Subject_polygon: Pgpc_polygon; Clip_polygon: Pgpc_polygon; - Result_polygon: Pgpc_polygon); - -procedure Gpc_free_polygon(Polygon: Pgpc_polygon); - -procedure Gpc_free_tristrip(Tristrip: Pgpc_tristrip); - -implementation - -uses - SysUtils, - Math; - - - -// =========================================================================== -// Constants -// =========================================================================== - -const - DBL_MAX: Double = MaxDouble; - - DBL_DIG = 15; - - FFALSE = 0; - FTRUE = 1; - - LEFT = 0; - RIGHT = 1; - - ABOVE = 0; - BELow = 1; - - CLIP = 0; - SUBJ = 1; - - INVERT_TRISTRIPS = FALSE; - - - -// =========================================================================== -// Private Data Types -// =========================================================================== - -type - Tvertex_type = ( { Edge intersection classes } - NUL, { Empty non-intersection } - EMX, { External maximum } - ELI, { External left intermediate } - TED, { Top edge } - ERI, { External right intermediate } - RED, { Right edge } - IMM, { Internal maximum and minimum } - IMN, { Internal minimum } - EMN, { External minimum } - EMM, { External maximum and minimum } - LED, { Left edge } - ILI, { Internal left intermediate } - BED, { Bottom edge } - IRI, { Internal right intermediate } - IMX, { Internal maximum } - FUL { Full non-intersection } - ); - - Th_state = { Horizontal edge states } - (NH, { No horizontal edge } - BH, { Bottom horizontal edge } - TH { Top horizontal edge } - ); - - Tbundle_state = (UNBUNDLED, BUNDLE_HEAD, BUNDLE_TAIL); - - PPvertex_node = ^Pvertex_node; - Pvertex_node = ^Tvertex_node; { Internal vertex list datatype } - - Tvertex_node = record - X: Double; { X coordinate component } - Y: Double; { Y coordinate component } - Next: Pvertex_node; { Pointer to next vertex in list } - end; - - Pvertex_node_array = ^Tvertex_node_array; { Helper type for indexing } - Tvertex_node_array = array [0..1] of Pvertex_node; - - PPpolygon_node = ^Ppolygon_node; - Ppolygon_node = ^Tpolygon_node; - - Tpolygon_node = record - Active: Integer; - Hole: Integer; - V: array [0..1] of Pvertex_node; - Next: Ppolygon_node; - Proxy: Ppolygon_node; - end; - - PPedge_node = ^Pedge_node; - Pedge_node = ^Tedge_node; - - Tedge_node = record - Vertex: Tgpc_vertex; { Piggy-backed contour vertex data } - Bot: Tgpc_vertex; { Edge Lower (x, y) coordinate } - Top: Tgpc_vertex; { Edge upper (x, y) coordinate } - Xb: Double; { Scanbeam bottom x coordinate } - Xt: Double; { Scanbeam top x coordinate } - Dx: Double; { Change in x for a unit y increase } - Typ: Integer; { Clip / subject edge flag } - Bundle: array [0..1, 0..1] of Integer; { Bundle edge flags } - Bside: array [0..1] of Integer; { Bundle left / right indicators } - Bstate: array [0..1] of Tbundle_state; { Edge bundle state } - Outp: array [0..1] of Ppolygon_node; { Output polygon / tristrip pointer } - Prev: Pedge_node; { Previous edge in the AET } - Next: Pedge_node; { Next edge in the AET } - Pred: Pedge_node; { Edge connected at the Lower end } - Succ: Pedge_node; { Edge connected at the upper end } - Next_bound: Pedge_node; { Pointer to next bound in LMT } - end; - - PPedge_node_array = ^Pedge_node_array; - Pedge_node_array = ^Tedge_node_array; - Tedge_node_array = array [0..MaxInt div SizeOf(Tedge_node) - 1] - of Tedge_node; - - PPlmt_node = ^Plmt_node; - Plmt_node = ^Tlmt_node; - - Tlmt_node = record { Local minima table } - Y: Double; { Y coordinate at local minimum } - First_bound: Pedge_node; { Pointer to bound list } - Next: Plmt_node; { Pointer to next local minimum } - end; - - PPsb_tree = ^Psb_tree; - Psb_tree = ^Tsb_tree; - - Tsb_tree = record { Scanbeam tree } - Y: Double; { Scanbeam node y value } - Less: Psb_tree; { Pointer to nodes with Lower y } - More: Psb_tree; { Pointer to nodes with Higher y } - end; - - PPit_node = ^Pit_node; - Pit_node = ^Tit_node; { Intersection table } - - Tit_node = record - Ie: array [0..1] of Pedge_node; { Intersecting edge (bundle) pair } - Point: Tgpc_vertex; { Point of intersection } - Next: Pit_node; { The next intersection table node } - end; - - PPst_node = ^Pst_node; - Pst_node = ^Tst_node; { Sorted edge table } - - Tst_node = record - Edge: Pedge_node; { Pointer to AET edge } - Xb: Double; { Scanbeam bottom x coordinate } - Xt: Double; { Scanbeam top x coordinate } - Dx: Double; { Change in x for a unit y increase } - Prev: Pst_node; { Previous edge in sorted list } - end; - - Pbbox = ^Tbbox; - - Tbbox = record { Contour axis-aligned bounding box } - Xmin: Double; { Minimum x coordinate } - Ymin: Double; { Minimum y coordinate } - Xmax: Double; { Maximum x coordinate } - Ymax: Double; { Maximum y coordinate } - end; - - PbboxArray = ^TbboxArray; - TbboxArray = array [0..MaxInt div SizeOf(Tbbox) - 1] of Tbbox; - - PDoubleArray = ^TDoubleArray; - TDoubleArray = array [0..MaxInt div SizeOf(Double) - 1] of Double; - - - - // =========================================================================== - // C Macros, defined as function for PASCAL - // =========================================================================== - -function EQ(A, B: Double): Boolean; -begin - EQ := Abs(A - B) <= Gpc_epsilon -end; - -function NE(A, B: Double): Boolean; -begin - NE := Abs(A - B) > Gpc_epsilon -end; - -function GT(A, B: Double): Boolean; -begin - GT := (A - B) > Gpc_epsilon -end; - -function LT(A, B: Double): Boolean; -begin - LT := (B - A) > Gpc_epsilon -end; - -function GE(A, B: Double): Boolean; -begin - GE := not LT(A, B) -end; - -function LE(A, B: Double): Boolean; -begin - LE := not GT(A, B) -end; - -function PREV_INDEX(I, N: Integer): Integer; -begin - PREV_INDEX := ((I - 1 + N) mod N); -end; - -function NEXT_INDEX(I, N: Integer): Integer; -begin - NEXT_INDEX := ((I + 1) mod N); -end; - -function OPTIMAL(V: Pgpc_vertex_array; I, N: Integer): Boolean; -begin - OPTIMAL := NE(V[PREV_INDEX(I, N)].Y, V[I].Y) or - NE(V[NEXT_INDEX(I, N)].Y, V[I].Y); -end; - -function FWD_MIN(V: Pedge_node_array; I, N: Integer): Boolean; -begin - FWD_MIN := GE(V[PREV_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y) and - GT(V[NEXT_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y); -end; - -function NOT_FMAX(V: Pedge_node_array; I, N: Integer): Boolean; -begin - NOT_FMAX := GT(V[NEXT_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y); -end; - -function REV_MIN(V: Pedge_node_array; I, N: Integer): Boolean; -begin - REV_MIN := GT(V[PREV_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y) and - GE(V[NEXT_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y); -end; - -function NOT_RMAX(V: Pedge_node_array; I, N: Integer): Boolean; -begin - NOT_RMAX := GT(V[PREV_INDEX(I, N)].Vertex.Y, V[I].Vertex.Y); -end; - -procedure MALLOC(var P: Pointer; B: Integer; S: string); -begin - GetMem(P, B); - if (P = nil) and (B <> 0) then - raise Exception.Create(S); -end; - -procedure AddVertex(var P: Pvertex_node; X, Y: Double); -begin - if P = nil then - begin - MALLOC(Pointer(P), SizeOf(Tvertex_node), 'tristrip vertex creation'); - P.X := X; - P.Y := Y; - P.Next := nil; - end - else - { Head further down the list } - AddVertex(P.Next, X, Y); -end; - -procedure VERTEX(var E: Pedge_node; P, S: Integer; var X, Y: Double); -begin - AddVertex(E.Outp[P].V[S], X, Y); - Inc(E.Outp[P].Active); -end; - -procedure P_EDGE(var D, E: Pedge_node; P: Integer; var I, J: Double); -begin - D := E; - repeat - D := D.Prev - until D.Outp[P] = nil; - I := D.Bot.X + D.Dx * (J - D.Bot.Y); -end; - -procedure N_EDGE(var D, E: Pedge_node; P: Integer; var I, J: Double); -begin - D := E; - repeat - D := D.Next; - until D.Outp[P] = nil; - I := D.Bot.X + D.Dx * (J - D.Bot.Y); -end; - -procedure Free(var P: Pointer); -begin - FreeMem(P); - P := nil; -end; - -procedure CFree(var P: Pointer); -begin - if P <> nil then - Free(P); -end; - - - -// =========================================================================== -// Global Data -// =========================================================================== - -{ Horizontal edge state transitions within scanbeam boundary } -const - Next_h_state: array [0..2, 0..5] of Th_state = - { ABOVE BELow CROSS } - { L R L R L R } - { NH } ((BH, TH, TH, BH, NH, NH), - { BH } (NH, NH, NH, NH, TH, TH), - { TH } (NH, NH, NH, NH, BH, BH)); - - - - - // =========================================================================== - // Private Functions - // =========================================================================== - -procedure Reset_it(var It: Pit_node); -var - Itn: Pit_node; -begin - while (It <> nil) do - begin - Itn := It.Next; - Free(Pointer(It)); - It := Itn; - end; -end; - -procedure Reset_lmt(var Lmt: Plmt_node); -var - Lmtn: Plmt_node; -begin - while Lmt <> nil do - begin - Lmtn := Lmt^.Next; - Free(Pointer(Lmt)); - Lmt := Lmtn; - end; -end; - -procedure Insert_bound(B: PPedge_node_array; E: Pedge_node_array); -var - Existing_bound: Pointer; -begin - if B^ = nil then - begin - { Link node e to the tail of the list } - B^ := E; - end - else - begin - { Do primary sort on the x field } - if (LT(E[0].Bot.X, B^[0].Bot.X)) then - begin - { Insert a new node mid-list } - Existing_bound := B^; - B^ := E; - B^[0].Next_bound := Existing_bound; - end - else - begin - if (EQ(E[0].Bot.X, B^[0].Bot.X)) then - begin - { Do secondary sort on the dx field } - if (LT(E[0].Dx, B^[0].Dx)) then - begin - { Insert a new node mid-list } - Existing_bound := B^; - B^ := E; - B^[0].Next_bound := Existing_bound; - end - else - begin - { Head further down the list } - Insert_bound(@(B^[0].Next_bound), E); - end; - end - else - begin - { Head further down the list } - Insert_bound(@(B^[0].Next_bound), E); - end; - end; - end; -end; - -function Bound_list(var Lmt: Plmt_node; Y: Double): PPedge_node_array; -var - Existing_node: Plmt_node; -begin - if Lmt = nil then - begin - { Add node onto the tail end of the LMT } - MALLOC(Pointer(Lmt), SizeOf(Tlmt_node), 'LMT insertion'); - Lmt.Y := Y; - Lmt.First_bound := nil; - Lmt.Next := nil; - Result := @Lmt.First_bound; - end - else if LT(Y, Lmt.Y) then - begin - { Insert a new LMT node before the current node } - Existing_node := Lmt; - MALLOC(Pointer(Lmt), SizeOf(Tlmt_node), 'LMT insertion'); - Lmt.Y := Y; - Lmt.First_bound := nil; - Lmt.Next := Existing_node; - Result := @Lmt.First_bound; - end - else if EQ(Y, Lmt.Y) then - { Use this existing LMT node } - Result := @Lmt.First_bound - else - { Head further up the LMT } - Result := Bound_list(Lmt.Next, Y); -end; - -procedure AddTo_sbtree(var Entries: Integer; var Sbtree: Psb_tree; - var Y: Double); -begin - if Sbtree = nil then - begin - { Add a new tree node here } - MALLOC(Pointer(Sbtree), SizeOf(Tsb_tree), 'scanbeam tree insertion'); - Sbtree.Y := Y; - Sbtree.Less := nil; - Sbtree.More := nil; - Inc(Entries); - end - else - begin - if GT(Sbtree.Y, Y) then - begin - { Head into the 'less' sub-tree } - AddTo_sbtree(Entries, Sbtree.Less, Y); - end - else - begin - if LT(Sbtree.Y, Y) then - begin - { Head into the 'more' sub-tree } - AddTo_sbtree(Entries, Sbtree.More, Y); - end; - end; - end; -end; - -procedure Build_sbt(var Entries: Integer; var Sbt: TDoubleArray; - Sbtree: Psb_tree); -begin - if Sbtree.Less <> nil then - Build_sbt(Entries, Sbt, Sbtree.Less); - Sbt[Entries] := Sbtree.Y; - Inc(Entries); - if Sbtree.More <> nil then - Build_sbt(Entries, Sbt, Sbtree.More); -end; - -procedure Free_sbtree(var Sbtree: Psb_tree); -begin - if Sbtree <> nil then - begin - Free_sbtree(Sbtree.Less); - Free_sbtree(Sbtree.More); - Free(Pointer(Sbtree)); - end; -end; - -function Count_optimal_vertices(C: Tgpc_vertex_list): Integer; -var - I: Integer; -begin - Result := 0; - - { Ignore non-contributing contours } - if C.NumVertices > 0 then - begin - for I := 0 to C.NumVertices - 1 do - { Ignore superfluous vertices embedded in horizontal edges } - if OPTIMAL(C.Vertex, I, C.NumVertices) then - Inc(Result); - end; -end; - -function Build_lmt(var Lmt: Plmt_node; var Sbtree: Psb_tree; - var Sbt_entries: Integer; P: Pgpc_polygon; Typ: Integer; Op: Tgpc_op) - : Pedge_node_array; - -var - C, I, Min, Max, Num_edges, V, NumVertices: Integer; - TotalVertices, EIndex : Integer; - E, Edge_table : Pedge_node_array; -begin - TotalVertices := 0; - EIndex := 0; - - for C := 0 to P.Num_contours - 1 do - Inc(TotalVertices, Count_optimal_vertices(P.Contour[C])); - - { Create the entire input polygon edge table in one go } - MALLOC(Pointer(Edge_table), TotalVertices * SizeOf(Tedge_node), - 'edge table creation'); - - for C := 0 to P.Num_contours - 1 do - begin - if P.Contour[C].NumVertices < 0 then - begin - { Ignore the non-contributing contour and repair the vertex count } - P.Contour[C].NumVertices := -P.Contour[C].NumVertices; - end - else - begin - { Perform contour optimisation } - NumVertices := 0; - for I := 0 to P.Contour[C].NumVertices - 1 do - if (OPTIMAL(P.Contour[C].Vertex, I, P.Contour[C].NumVertices)) then - begin - Edge_table[NumVertices].Vertex.X := P.Contour[C].Vertex[I].X; - Edge_table[NumVertices].Vertex.Y := P.Contour[C].Vertex[I].Y; - - { Record vertex in the scanbeam table } - AddTo_sbtree(Sbt_entries, Sbtree, Edge_table[NumVertices].Vertex.Y); - - Inc(NumVertices); - end; - - { Do the contour forward pass } - for Min := 0 to NumVertices - 1 do - begin - { If a forward local minimum... } - if FWD_MIN(Edge_table, Min, NumVertices) then - begin - { Search for the next local maximum... } - Num_edges := 1; - Max := NEXT_INDEX(Min, NumVertices); - while (NOT_FMAX(Edge_table, Max, NumVertices)) do - begin - Inc(Num_edges); - Max := NEXT_INDEX(Max, NumVertices); - end; - - { Build the next edge list } - E := @Edge_table[EIndex]; - Inc(EIndex, Num_edges); - V := Min; - E[0].Bstate[BELow] := UNBUNDLED; - E[0].Bundle[BELow][CLIP] := FFALSE; - E[0].Bundle[BELow][SUBJ] := FFALSE; - for I := 0 to Num_edges - 1 do - begin - E[I].Xb := Edge_table[V].Vertex.X; - E[I].Bot.X := Edge_table[V].Vertex.X; - E[I].Bot.Y := Edge_table[V].Vertex.Y; - - V := NEXT_INDEX(V, NumVertices); - - E[I].Top.X := Edge_table[V].Vertex.X; - E[I].Top.Y := Edge_table[V].Vertex.Y; - E[I].Dx := (Edge_table[V].Vertex.X - E[I].Bot.X) / - (E[I].Top.Y - E[I].Bot.Y); - E[I].Typ := Typ; - E[I].Outp[ABOVE] := nil; - E[I].Outp[BELow] := nil; - E[I].Next := nil; - E[I].Prev := nil; - if (Num_edges > 1) and (I < (Num_edges - 1)) then - E[I].Succ := @E[I + 1] - else - E[I].Succ := nil; - if (Num_edges > 1) and (I > 0) then - E[I].Pred := @E[I - 1] - else - E[I].Pred := nil; - E[I].Next_bound := nil; - if Op = GPC_DIFF then - E[I].Bside[CLIP] := RIGHT - else - E[I].Bside[CLIP] := LEFT; - E[I].Bside[SUBJ] := LEFT; - end; - Insert_bound(Bound_list(Lmt, Edge_table[Min].Vertex.Y), E); - end; - end; - - { Do the contour reverse pass } - for Min := 0 to NumVertices - 1 do - begin - { If a reverse local minimum... } - if REV_MIN(Edge_table, Min, NumVertices) then - begin - { Search for the previous local maximum... } - Num_edges := 1; - Max := PREV_INDEX(Min, NumVertices); - while NOT_RMAX(Edge_table, Max, NumVertices) do - begin - Inc(Num_edges); - Max := PREV_INDEX(Max, NumVertices); - end; - - { Build the previous edge list } - E := @Edge_table[EIndex]; - Inc(EIndex, Num_edges); - V := Min; - E[0].Bstate[BELow] := UNBUNDLED; - E[0].Bundle[BELow][CLIP] := FFALSE; - E[0].Bundle[BELow][SUBJ] := FFALSE; - for I := 0 to Num_edges - 1 do - begin - E[I].Xb := Edge_table[V].Vertex.X; - E[I].Bot.X := Edge_table[V].Vertex.X; - E[I].Bot.Y := Edge_table[V].Vertex.Y; - - V := PREV_INDEX(V, NumVertices); - - E[I].Top.X := Edge_table[V].Vertex.X; - E[I].Top.Y := Edge_table[V].Vertex.Y; - E[I].Dx := (Edge_table[V].Vertex.X - E[I].Bot.X) / - (E[I].Top.Y - E[I].Bot.Y); - E[I].Typ := Typ; - E[I].Outp[ABOVE] := nil; - E[I].Outp[BELow] := nil; - E[I].Next := nil; - E[I].Prev := nil; - if (Num_edges > 1) and (I < (Num_edges - 1)) then - E[I].Succ := @E[I + 1] - else - E[I].Succ := nil; - if (Num_edges > 1) and (I > 0) then - E[I].Pred := @E[I - 1] - else - E[I].Pred := nil; - E[I].Next_bound := nil; - if Op = GPC_DIFF then - E[I].Bside[CLIP] := RIGHT - else - E[I].Bside[CLIP] := LEFT; - E[I].Bside[SUBJ] := LEFT; - end; - Insert_bound(Bound_list(Lmt, Edge_table[Min].Vertex.Y), E); - end; - end; - end; - end; - Result := Edge_table; -end; - -procedure Add_edgeTo_aet(var Aet: Pedge_node; Edge: Pedge_node; - Prev: Pedge_node); -begin - if Aet = nil then - begin - { Append edge onto the tail end of the AET } - Aet := Edge; - Edge.Prev := Prev; - Edge.Next := nil; - end - else - begin - { Do primary sort on the xb field } - if LT(Edge.Xb, Aet.Xb) then - begin - { Insert edge here (before the AET edge) } - Edge.Prev := Prev; - Edge.Next := Aet; - Aet.Prev := Edge; - Aet := Edge; - end - else - begin - if EQ(Edge.Xb, Aet.Xb) then - begin - { Do secondary sort on the dx field } - if LT(Edge.Dx, Aet.Dx) then - begin - { Insert edge here (before the AET edge) } - Edge.Prev := Prev; - Edge.Next := Aet; - Aet.Prev := Edge; - Aet := Edge; - end - else - begin - { Head further into the AET } - Add_edgeTo_aet(Aet.Next, Edge, Aet); - end; - end - else - begin - { Head further into the AET } - Add_edgeTo_aet(Aet.Next, Edge, Aet); - end; - end; - end; -end; - -procedure AddIntersection(var It: Pit_node; Edge0, Edge1: Pedge_node; - X, Y: Double); -var - Existing_node: Pit_node; -begin - - if It = nil then - begin - { Append a new node to the tail of the list } - MALLOC(Pointer(It), SizeOf(Tit_node), 'IT insertion'); - It.Ie[0] := Edge0; - It.Ie[1] := Edge1; - It.Point.X := X; - It.Point.Y := Y; - It.Next := nil; - end - else - begin - if GT(It.Point.Y, Y) then - begin - { Insert a new node mid-list } - Existing_node := It; - MALLOC(Pointer(It), SizeOf(Tit_node), 'IT insertion'); - It.Ie[0] := Edge0; - It.Ie[1] := Edge1; - It.Point.X := X; - It.Point.Y := Y; - It.Next := Existing_node; - end - else - { Head further down the list } - AddIntersection(It.Next, Edge0, Edge1, X, Y); - end; -end; - -procedure Add_st_edge(var St: Pst_node; var It: Pit_node; Edge: Pedge_node; - Dy: Double); -var - Existing_node: Pst_node; - Den, X, Y, R : Double; -begin - if St = nil then - begin - { Append edge onto the tail end of the ST } - MALLOC(Pointer(St), SizeOf(Tst_node), 'ST insertion'); - St.Edge := Edge; - St.Xb := Edge.Xb; - St.Xt := Edge.Xt; - St.Dx := Edge.Dx; - St.Prev := nil; - end - else - begin - Den := (St.Xt - St.Xb) - (Edge.Xt - Edge.Xb); - - { If new edge and ST edge don't cross } - if (GE(Edge.Xt, St.Xt) or EQ(Edge.Dx, St.Dx) or EQ(Den, 0.0)) then - begin - { No intersection - insert edge here (before the ST edge) } - Existing_node := St; - MALLOC(Pointer(St), SizeOf(Tst_node), 'ST insertion'); - St.Edge := Edge; - St.Xb := Edge.Xb; - St.Xt := Edge.Xt; - St.Dx := Edge.Dx; - St.Prev := Existing_node; - end - else - begin - { Compute intersection between new edge and ST edge } - R := (Edge.Xb - St.Xb) / Den; - X := St.Xb + R * (St.Xt - St.Xb); - Y := R * Dy; - - { Insert the edge pointers and the intersection point in the IT } - AddIntersection(It, St.Edge, Edge, X, Y); - - { Head further into the ST } - Add_st_edge(St.Prev, It, Edge, Dy); - - end; - end; -end; - -procedure BuildIntersection_table(var It: Pit_node; Aet: Pedge_node; - Dy: Double); -var - St, Stp: Pst_node; - Edge : Pedge_node; -begin - - { Build intersection table for the current scanbeam } - Reset_it(It); - St := nil; - - { Process each AET edge } - Edge := Aet; - while Edge <> nil do - begin - if (Edge.Bstate[ABOVE] = BUNDLE_HEAD) or (Edge.Bundle[ABOVE][CLIP] <> 0) or - (Edge.Bundle[ABOVE][SUBJ] <> 0) then - Add_st_edge(St, It, Edge, Dy); - Edge := Edge.Next; - end; - - { Free the sorted edge table } - while St <> nil do - begin - Stp := St.Prev; - Free(Pointer(St)); - St := Stp; - end; -end; - -function Count_contours(Polygon: Ppolygon_node): Integer; -var - Nv : Integer; - V, Nextv: Pvertex_node; -begin - - Result := 0; - while Polygon <> nil do - begin - if Polygon.Active <> 0 then - begin - { Count the vertices in the current contour } - Nv := 0; - V := Polygon.Proxy.V[LEFT]; - while V <> nil do - begin - Inc(Nv); - V := V.Next; - end; - - { Record valid vertex counts in the active field } - if (Nv > 2) then - begin - Polygon.Active := Nv; - Inc(Result); - end - else - begin - { Invalid contour: just free the heap } - V := Polygon.Proxy.V[LEFT]; - while V <> nil do - begin - Nextv := V.Next; - FREE(Pointer(V)); - V := Nextv; - end; - Polygon.Active := 0; - end; - end; - - Polygon := Polygon.Next; - end; -end; - -procedure Add_left(P: Ppolygon_node; X, Y: Double); -var - Nv: Pvertex_node; -begin - { Create a new vertex node and set its fields } - MALLOC(Pointer(Nv), SizeOf(Tvertex_node), 'vertex node creation'); - Nv.X := X; - Nv.Y := Y; - - { Add vertex nv to the left end of the polygon's vertex list } - Nv.Next := P.Proxy.V[LEFT]; - - { Update proxy[LEFT] to point to nv } - P.Proxy.V[LEFT] := Nv; -end; - -procedure Merge_left(P: Ppolygon_node; Q: Ppolygon_node; List: Ppolygon_node); -var - Target: Ppolygon_node; -begin - { Label contour as a hole } - Q.Proxy.Hole := FTRUE; - - if P.Proxy <> Q.Proxy then - begin - { Assign P's vertex list to the left end of Q's list } - P.Proxy.V[RIGHT].Next := Q.Proxy.V[LEFT]; - Q.Proxy.V[LEFT] := P.Proxy.V[LEFT]; - - { Redirect any P->proxy references to Q->proxy } - Target := P.Proxy; - while List <> nil do - begin - if List.Proxy = Target then - begin - List.Active := FFALSE; - List.Proxy := Q.Proxy; - end; - List := List.Next; - end; - end; -end; - -procedure Add_right(P: Ppolygon_node; X, Y: Double); -var - Nv: Pvertex_node; -begin - - { Create a new vertex node and set its fields } - MALLOC(Pointer(Nv), SizeOf(Tvertex_node), 'vertex node creation'); - Nv.X := X; - Nv.Y := Y; - Nv.Next := nil; - - { Add vertex nv to the right end of the polygon's vertex list } - P.Proxy.V[RIGHT].Next := Nv; - - { Update proxy.v[RIGHT] to point to nv } - P.Proxy.V[RIGHT] := Nv; -end; - -procedure Merge_right(P: Ppolygon_node; Q: Ppolygon_node; List: Ppolygon_node); -var - Target: PPolygon_node; -begin - { Label contour as external } - Q.Proxy.Hole := FFALSE; - - if P.Proxy <> Q.Proxy then - begin - { Assign P's vertex list to the right end of Q's list } - Q.Proxy.V[RIGHT].Next := P.Proxy.V[LEFT]; - Q.Proxy.V[RIGHT] := P.Proxy.V[RIGHT]; - - { Redirect any P->proxy references to Q->proxy } - Target := P.Proxy; - while List <> nil do - begin - if List.Proxy = Target then - begin - List.Active := FFALSE; - List.Proxy := Q.Proxy; - end; - List := List.Next; - end; - end; -end; - -procedure Add_local_min(P: PPpolygon_node; Edge: Pedge_node; X, Y: Double); -var - Nv : Pvertex_node; - Existing_min: Ppolygon_node; -begin - Existing_min := P^; - - MALLOC(Pointer(P^), SizeOf(Tpolygon_node), 'polygon node creation'); - - { Create a new vertex node and set its fields } - MALLOC(Pointer(Nv), SizeOf(Tvertex_node), 'vertex node creation'); - Nv.X := X; - Nv.Y := Y; - Nv.Next := nil; - - { Initialise proxy to point to p itself } - P^.Proxy := P^; - P^.Active := FTRUE; - P^.Next := Existing_min; - - { Make v[LEFT] and v[RIGHT] point to new vertex nv } - P^.V[LEFT] := Nv; - P^.V[RIGHT] := Nv; - - { Assign polygon p to the edge } - Edge.Outp[ABOVE] := P^; -end; - -function Count_tristrips(Tn: Ppolygon_node): Integer; -begin - Result := 0; - - while Tn <> nil do - begin - if Tn.Active > 2 then - Inc(Result); - Tn := Tn.Next; - end; -end; - -(* - procedure AddVertex(t : PPvertex_node; x, y : double) - begin - if t^ <> nil then - begin - MALLOC(t^, SizeOf(Tvertex_node), ttristrip vertex creationt'); - t^.x := x; - t^.y := y; - t^.next := nil; - end - else - { Head further down the list } - AddVertex(@t^.next, x, y); - end; -*) - -procedure New_tristrip(var Tn: Ppolygon_node; Edge: Pedge_node; X, Y: Double); -begin - if Tn = nil then - begin - MALLOC(Pointer(Tn), SizeOf(Tpolygon_node), 'tristrip node creation'); - Tn.Next := nil; - Tn.V[LEFT] := nil; - Tn.V[RIGHT] := nil; - Tn.Active := 1; - AddVertex(Tn.V[LEFT], X, Y); - Edge.Outp[ABOVE] := Tn; - end - else - { Head further down the list } - New_tristrip(Tn.Next, Edge, X, Y); -end; - -function Create_contour_bboxes(P: Pgpc_polygon): PbboxArray; -var - C, V: Integer; -begin - MALLOC(Pointer(Result), P.Num_contours * SizeOf(Tbbox), - 'Bounding box creation'); - - { Construct contour bounding boxes } - for C := 0 to P.Num_contours - 1 do - begin - { Initialise bounding box extent } - Result[C].Xmin := DBL_MAX; - Result[C].Ymin := DBL_MAX; - Result[C].Xmax := -DBL_MAX; - Result[C].Ymax := -DBL_MAX; - - for V := 0 to P.Contour[C].NumVertices - 1 do - begin - { Adjust bounding Result } - if (P.Contour[C].Vertex[V].X < Result[C].Xmin) then - Result[C].Xmin := P.Contour[C].Vertex[V].X; - if (P.Contour[C].Vertex[V].Y < Result[C].Ymin) then - Result[C].Ymin := P.Contour[C].Vertex[V].Y; - if (P.Contour[C].Vertex[V].X > Result[C].Xmax) then - Result[C].Xmax := P.Contour[C].Vertex[V].X; - if (P.Contour[C].Vertex[V].Y > Result[C].Ymax) then - Result[C].Ymax := P.Contour[C].Vertex[V].Y; - end; - end; -end; - -procedure Minimax_test(Subj: Pgpc_polygon; Clip: Pgpc_polygon; Op: Tgpc_op); -var - S_bbox, C_bbox: PbboxArray; - S, C : Integer; - O_table : PIntegerArray; - Overlap : Integer; -begin - S_bbox := Create_contour_bboxes(Subj); - C_bbox := Create_contour_bboxes(Clip); - - MALLOC(Pointer(O_table), Subj.Num_contours * Clip.Num_contours * - SizeOf(Integer), 'overlap table creation'); - - { Check all subject contour bounding boxes against clip boxes } - for S := 0 to Subj.Num_contours - 1 do - for C := 0 to Clip.Num_contours - 1 do - O_table[C * Subj.Num_contours + S] := - Integer((not(LT(S_bbox[S].Xmax, C_bbox[C].Xmin) or GT(S_bbox[S].Xmin, - C_bbox[C].Xmax))) and (not(LT(S_bbox[S].Ymax, C_bbox[C].Ymin) or - GT(S_bbox[S].Ymin, C_bbox[C].Ymax)))); - - { For each clip contour, search for any subject contour overlaps } - for C := 0 to Clip.Num_contours - 1 do - begin - Overlap := 0; - S := 0; - while (Overlap = 0) and (S < Subj.Num_contours) do - begin - Overlap := O_table[C * Subj.Num_contours + S]; - Inc(S); - end; - - if Overlap = 0 then - { Flag non contributing status by negating vertex count } - Clip.Contour[C].NumVertices := -Clip.Contour[C].NumVertices; - end; - - if (Op = GPC_INT) then - begin - { For each subject contour, search for any clip contour overlaps } - for S := 0 to Subj.Num_contours - 1 do - begin - Overlap := 0; - C := 0; - while (Overlap = 0) and (C < Clip.Num_contours) do - begin - Overlap := O_table[C * Subj.Num_contours + S]; - Inc(C); - end; - - if Overlap = 0 then - { Flag non contributing status by negating vertex count } - Subj.Contour[S].NumVertices := -Subj.Contour[S].NumVertices; - end; - end; - - FREE(Pointer(S_bbox)); - FREE(Pointer(C_bbox)); - FREE(Pointer(O_table)); -end; - - -// =========================================================================== -// Public Functions -// =========================================================================== - -procedure Gpc_free_polygon(Polygon: Pgpc_polygon); -var - C: Integer; -begin - for C := 0 to Polygon.Num_contours - 1 do - CFree(Pointer(Polygon.Contour[C].Vertex)); - - CFree(Pointer(Polygon.Hole)); - CFree(Pointer(Polygon.Contour)); - Polygon.Num_contours := 0; -end; - -procedure Gpc_read_polygon(var F: Text; P: Pgpc_polygon); -var - C, V: Integer; -begin - Readln(F, P.Num_contours); - MALLOC(Pointer(P.Contour), P.Num_contours * SizeOf(Tgpc_vertex_list), - 'contour creation'); - for C := 0 to P.Num_contours - 1 do - begin - Readln(F, P.Contour[C].NumVertices); - MALLOC(Pointer(P.Contour[C].Vertex), P.Contour[C].NumVertices * - SizeOf(Tgpc_vertex), 'vertex creation'); - for V := 0 to P.Contour[C].NumVertices - 1 do - begin - read(F, P.Contour[C].Vertex[V].X); - Readln(F, P.Contour[C].Vertex[V].Y); - end; - end; -end; - -procedure Gpc_write_polygon(var F: Text; P: Pgpc_polygon); -var - C, V: Integer; -begin - Writeln(F, P.Num_contours); - for C := 0 to P.Num_contours - 1 do - begin - Writeln(F, P.Contour[C].NumVertices); - for V := 0 to P.Contour[C].NumVertices - 1 do - Writeln(F, P.Contour[C].Vertex[V].X:20:DBL_DIG, ' ', - P.Contour[C].Vertex[V].Y:20:DBL_DIG); - end; -end; - -procedure Gpc_add_contour(Polygon: Pgpc_polygon; Contour: Pgpc_vertex_list; - Hole: Integer); -var - C, V : Integer; - Extended_hole : PIntegerArray; - Extended_contour: Pgpc_vertex_list_array; -begin - - { Create an extended hole array } - MALLOC(Pointer(Extended_hole), (Polygon.Num_contours + 1) * SizeOf(Integer), - 'contour hole addition'); - - { Create an extended contour array } - MALLOC(Pointer(Extended_contour), (Polygon.Num_contours + 1) * - SizeOf(Tgpc_vertex_list), 'contour addition'); - - { Copy the old contour into the extended contour array } - for C := 0 to Polygon.Num_contours - 1 do - begin - Extended_hole[C] := Polygon.Hole[C]; - Extended_contour[C] := Polygon.Contour[C]; - end; - - { Copy the new contour onto the end of the extended contour array } - C := Polygon.Num_contours; - Extended_hole[C] := Hole; - Extended_contour[C].NumVertices := Contour.NumVertices; - MALLOC(Pointer(Extended_contour[C].Vertex), Contour.NumVertices * - SizeOf(Tgpc_vertex), 'contour addition'); - for V := 0 to Contour.NumVertices - 1 do - Extended_contour[C].Vertex[V] := Contour.Vertex[V]; - - { Dispose of the old contour } - CFREE(Pointer(Polygon.Contour)); - CFREE(Pointer(Polygon.Hole)); - - { Update the polygon information } - Inc(Polygon.Num_contours); - Polygon.Hole := Extended_hole; - Polygon.Contour := Extended_contour; -end; - -procedure Gpc_polygon_clip(Set_operation: Tgpc_op; - Subject_polygon: Pgpc_polygon; Clip_polygon: Pgpc_polygon; - Result_polygon: Pgpc_polygon); - -var - Sbtree : Psb_tree; - It, Intersect : Pit_node; - Edge, Prev_edge, Next_edge, Succ_edge: Pedge_node; - E0, E1 : Pedge_node; - Aet : Pedge_node; - C_heap, S_heap : Pedge_node_array; - Lmt, Local_min : Plmt_node; - Out_poly, P, Q, Poly, Npoly, Cf : Ppolygon_node; - Vtx, Nv : Pvertex_node; - Horiz : array [0..1] of Th_state; - Inn, Exists, Parity : array [0..1] of Integer; - C, V, Contributing, Search, Scanbeam : Integer; - Sbt_entries, _class, Bl, Br, Tl, Tr : Integer; - Sbt : PDoubleArray; - Xb, Px, Yb, Yt, Dy, Ix, Iy : Double; -begin - Edge := nil; - Sbtree := nil; - It := nil; - Aet := nil; - Lmt := nil; - Out_poly := nil; - Cf := nil; - Inn[0] := LEFT; - Inn[1] := LEFT; - Exists[0] := LEFT; - Exists[1] := LEFT; - Parity[0] := LEFT; - Parity[1] := LEFT; - Scanbeam := 0; - Sbt_entries := 0; - Sbt := nil; - - { Test for trivial NULL result cases } - if ((Subject_polygon.Num_contours = 0) and (Clip_polygon.Num_contours = 0)) or - ((Subject_polygon.Num_contours = 0) and ((Set_operation = GPC_INT) or - (Set_operation = GPC_DIFF))) or ((Clip_polygon.Num_contours = 0) and - (Set_operation = GPC_INT)) then - begin - Result_polygon.Num_contours := 0; - Result_polygon.Hole := nil; - Result_polygon.Contour := nil; - Exit; - end; - - { Identify potentialy contributing contours } - if (((Set_operation = GPC_INT) or (Set_operation = GPC_DIFF)) and - (Subject_polygon.Num_contours > 0) and (Clip_polygon.Num_contours > 0)) then - Minimax_test(Subject_polygon, Clip_polygon, Set_operation); - - { Build LMT } - if Subject_polygon.Num_contours > 0 then - S_heap := Build_lmt(Lmt, Sbtree, Sbt_entries, Subject_polygon, SUBJ, - Set_operation); - if Clip_polygon.Num_contours > 0 then - C_heap := Build_lmt(Lmt, Sbtree, Sbt_entries, Clip_polygon, CLIP, - Set_operation); - - { Return a NULL result if no contours contribute } - if Lmt = nil then - begin - Result_polygon.Num_contours := 0; - Result_polygon.Hole := nil; - Result_polygon.Contour := nil; - Reset_lmt(Lmt); - FREE(Pointer(S_heap)); - FREE(Pointer(C_heap)); - Exit; - end; - - { Build scanbeam table from scanbeam tree } - MALLOC(Pointer(Sbt), Sbt_entries * SizeOf(Double), 'sbt creation'); - Build_sbt(Scanbeam, Sbt^, Sbtree); - Scanbeam := 0; - Free_sbtree(Sbtree); - - { AlLow pointer re-use without causing memory leak } - if Subject_polygon = Result_polygon then - Gpc_free_polygon(Subject_polygon); - if Clip_polygon = Result_polygon then - Gpc_free_polygon(Clip_polygon); - - { Invert clip polygon for difference operation } - if Set_operation = GPC_DIFF then - Parity[CLIP] := RIGHT; - - Local_min := Lmt; - - { Process each scanbeam } - while (Scanbeam < Sbt_entries) do - begin - { Set yb and yt to the bottom and top of the scanbeam } - Yb := Sbt[Scanbeam]; - Inc(Scanbeam); - if Scanbeam < Sbt_entries then - begin - Yt := Sbt[Scanbeam]; - Dy := Yt - Yb; - end; - - { === SCANBEAM BOUNDARY PROCESSING ================================ } - - { If LMT node corresponding to yb exists } - if Local_min <> nil then - begin - if EQ(Local_min.Y, Yb) then - begin - { Add edges starting at this local minimum to the AET } - Edge := Local_min.First_bound; - while Edge <> nil do - begin - Add_edgeTo_aet(Aet, Edge, nil); - Edge := Edge.Next_bound; - end; - Local_min := Local_min.Next; - end; - end; - - { Set dummy previous x value } - Px := -DBL_MAX; - - { Create bundles within AET } - E0 := Aet; - E1 := Aet; - - { Set up bundle fields of first edge } - Aet.Bundle[ABOVE][Integer(Aet.Typ <> 0)] := Integer(NE(Aet.Top.Y, Yb)); - Aet.Bundle[ABOVE][Integer(Aet.Typ = 0)] := FFALSE; - Aet.Bstate[ABOVE] := UNBUNDLED; - - Next_edge := Aet.Next; - - while Next_edge <> nil do - begin - { Set up bundle fields of next edge } - Next_edge.Bundle[ABOVE][Next_edge.Typ] := - Integer(NE(Next_edge.Top.Y, Yb)); - Next_edge.Bundle[ABOVE][Integer(Next_edge.Typ = 0)] := FFALSE; - Next_edge.Bstate[ABOVE] := UNBUNDLED; - - { Bundle edges above the scanbeam boundary if they coincide } - if Next_edge.Bundle[ABOVE][Next_edge.Typ] <> 0 then - begin - if (EQ(E0.Xb, Next_edge.Xb) and EQ(E0.Dx, Next_edge.Dx) and - NE(E0.Top.Y, Yb)) then - begin - Next_edge.Bundle[ABOVE][Next_edge.Typ] := Next_edge.Bundle[ABOVE] - [Next_edge.Typ] xor E0.Bundle[ABOVE][Next_edge.Typ]; - Next_edge.Bundle[ABOVE][Integer(Next_edge.Typ = 0)] := - E0.Bundle[ABOVE][Integer(Next_edge.Typ = 0)]; - Next_edge.Bstate[ABOVE] := BUNDLE_HEAD; - E0.Bundle[ABOVE][CLIP] := FFALSE; - E0.Bundle[ABOVE][SUBJ] := FFALSE; - E0.Bstate[ABOVE] := BUNDLE_TAIL; - end; - E0 := Next_edge; - end; - Next_edge := Next_edge.Next; - end; - - Horiz[CLIP] := NH; - Horiz[SUBJ] := NH; - - { Process each edge at this scanbeam boundary } - Edge := Aet; - while Edge <> nil do - begin - Exists[CLIP] := Edge.Bundle[ABOVE][CLIP] + - (Edge.Bundle[BELow][CLIP] shl 1); - Exists[SUBJ] := Edge.Bundle[ABOVE][SUBJ] + - (Edge.Bundle[BELow][SUBJ] shl 1); - - if (Exists[CLIP] <> 0) or (Exists[SUBJ] <> 0) then - begin - { Set bundle side } - Edge.Bside[CLIP] := Parity[CLIP]; - Edge.Bside[SUBJ] := Parity[SUBJ]; - - { Determine contributing status and quadrant occupancies } - case Set_operation of - GPC_DIFF, GPC_INT: - begin - Contributing := - Integer(((Exists[CLIP] <> 0) and ((Parity[SUBJ] <> 0) or - (Horiz[SUBJ] <> NH))) or ((Exists[SUBJ] <> 0) and - ((Parity[CLIP] <> 0) or (Horiz[CLIP] <> NH))) or - ((Exists[CLIP] <> 0) and (Exists[SUBJ] <> 0) and - (Parity[CLIP] = Parity[SUBJ]))); - Br := Integer((Parity[CLIP] <> 0) and (Parity[SUBJ] <> 0)); - Bl := Integer(((Parity[CLIP] xor Edge.Bundle[ABOVE][CLIP]) <> 0) - and ((Parity[SUBJ] xor Edge.Bundle[ABOVE][SUBJ]) <> 0)); - Tr := Integer(((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH)) <> 0) - and ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH)) <> 0)); - Tl := Integer - (((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH) xor Edge.Bundle - [BELow][CLIP]) <> 0) and - ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH) xor Edge.Bundle - [BELow][SUBJ]) <> 0)); - end; - - GPC_XOR: - begin - Contributing := Integer((Exists[CLIP] <> 0) or - (Exists[SUBJ] <> 0)); - Br := Integer(Parity[CLIP] xor Parity[SUBJ]); - Bl := Integer(((Parity[CLIP] xor Edge.Bundle[ABOVE][CLIP]) <> 0) - xor ((Parity[SUBJ] xor Edge.Bundle[ABOVE][SUBJ]) <> 0)); - Tr := Integer(((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH)) <> 0) - xor ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH)) <> 0)); - Tl := Integer - (((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH) xor Edge.Bundle - [BELow][CLIP]) <> 0) - xor ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH) - xor Edge.Bundle[BELow][SUBJ]) <> 0)); - end; - - GPC_UNION: - begin - Contributing := - Integer(((Exists[CLIP] <> 0) and ((Parity[SUBJ] = 0) or - (Horiz[SUBJ] <> NH))) or ((Exists[SUBJ] <> 0) and - ((Parity[CLIP] = 0) or (Horiz[CLIP] <> NH))) or - ((Exists[CLIP] <> 0) and (Exists[SUBJ] <> 0) and - (Parity[CLIP] = Parity[SUBJ]))); - - Br := Integer((Parity[CLIP] <> 0) or (Parity[SUBJ] <> 0)); - Bl := Integer(((Parity[CLIP] xor Edge.Bundle[ABOVE][CLIP]) <> 0) - or ((Parity[SUBJ] xor Edge.Bundle[ABOVE][SUBJ]) <> 0)); - Tr := Integer(((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH)) <> 0) - or ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH)) <> 0)); - Tl := Integer - (((Parity[CLIP] xor Integer(Horiz[CLIP] <> NH) xor Edge.Bundle - [BELow][CLIP]) <> 0) or - ((Parity[SUBJ] xor Integer(Horiz[SUBJ] <> NH) xor Edge.Bundle - [BELow][SUBJ]) <> 0)); - end; - end; { case } - - { Update parity } - (* parity[CLIP] := integer((parity[CLIP] <> 0) xor (edge.bundle[ABOVE][CLIP] <> 0)); - parity[SUBJ] := integer((parity[SUBJ] <> 0) xor (edge.bundle[ABOVE][SUBJ] <> 0)); - *) - Parity[CLIP] := Parity[CLIP] xor Edge.Bundle[ABOVE][CLIP]; - Parity[SUBJ] := Parity[SUBJ] xor Edge.Bundle[ABOVE][SUBJ]; - - { Update horizontal state } - if Exists[CLIP] <> 0 then - Horiz[CLIP] := Next_h_state[Integer(Horiz[CLIP]) - ][((Exists[CLIP] - 1) shl 1) + Parity[CLIP]]; - if Exists[SUBJ] <> 0 then - Horiz[SUBJ] := Next_h_state[Integer(Horiz[SUBJ]) - ][((Exists[SUBJ] - 1) shl 1) + Parity[SUBJ]]; - - _class := Tr + (Tl shl 1) + (Br shl 2) + (Bl shl 3); - - if Contributing <> 0 then - begin - Xb := Edge.Xb; - - case Tvertex_type(_class) of - EMN, IMN: - begin - Add_local_min(@Out_poly, Edge, Xb, Yb); - Px := Xb; - Cf := Edge.Outp[ABOVE]; - end; - ERI: - begin - if NE(Xb, Px) then - begin - Add_right(Cf, Xb, Yb); - Px := Xb; - end; - Edge.Outp[ABOVE] := Cf; - Cf := nil; - end; - ELI: - begin - Add_left(Edge.Outp[BELow], Xb, Yb); - Px := Xb; - Cf := Edge.Outp[BELow]; - end; - EMX: - begin - if NE(Xb, Px) then - begin - Add_left(Cf, Xb, Yb); - Px := Xb; - end; - Merge_right(Cf, Edge.Outp[BELow], Out_poly); - Cf := nil; - end; - ILI: - begin - if NE(Xb, Px) then - begin - Add_left(Cf, Xb, Yb); - Px := Xb; - end; - Edge.Outp[ABOVE] := Cf; - Cf := nil; - end; - IRI: - begin - Add_right(Edge.Outp[BELow], Xb, Yb); - Px := Xb; - Cf := Edge.Outp[BELow]; - Edge.Outp[BELow] := nil; - end; - IMX: - begin - if NE(Xb, Px) then - begin - Add_right(Cf, Xb, Yb); - Px := Xb; - end; - Merge_left(Cf, Edge.Outp[BELow], Out_poly); - Cf := nil; - Edge.Outp[BELow] := nil; - end; - IMM: - begin - if NE(Xb, Px) then - begin - Add_right(Cf, Xb, Yb); - Px := Xb; - end; - Merge_left(Cf, Edge.Outp[BELow], Out_poly); - Edge.Outp[BELow] := nil; - Add_local_min(@Out_poly, Edge, Xb, Yb); - Cf := Edge.Outp[ABOVE]; - end; - EMM: - begin - if NE(Xb, Px) then - begin - Add_left(Cf, Xb, Yb); - Px := Xb; - end; - Merge_right(Cf, Edge.Outp[BELow], Out_poly); - Edge.Outp[BELow] := nil; - Add_local_min(@Out_poly, Edge, Xb, Yb); - Cf := Edge.Outp[ABOVE]; - end; - LED: - begin - if EQ(Edge.Bot.Y, Yb) then - Add_left(Edge.Outp[BELow], Xb, Yb); - Edge.Outp[ABOVE] := Edge.Outp[BELow]; - Px := Xb; - end; - RED: - begin - if EQ(Edge.Bot.Y, Yb) then - Add_right(Edge.Outp[BELow], Xb, Yb); - Edge.Outp[ABOVE] := Edge.Outp[BELow]; - Px := Xb; - end; - else - end; { End of case } - end; { End of contributing conditional } - end; { End of edge exists conditional } - Edge := Edge.Next; - end; { End of AET loop } - - { Delete terminating edges from the AET, otherwise compute xt } - Edge := Aet; - while Edge <> nil do - begin - if EQ(Edge.Top.Y, Yb) then - begin - Prev_edge := Edge.Prev; - Next_edge := Edge.Next; - if Prev_edge <> nil then - Prev_edge.Next := Next_edge - else - Aet := Next_edge; - if Next_edge <> nil then - Next_edge.Prev := Prev_edge; - - { Copy bundle head state to the adjacent tail edge if required } - if (Edge.Bstate[BELow] = BUNDLE_HEAD) and (Prev_edge <> nil) then - begin - if Prev_edge.Bstate[BELow] = BUNDLE_TAIL then - begin - Prev_edge.Outp[BELow] := Edge.Outp[BELow]; - Prev_edge.Bstate[BELow] := UNBUNDLED; - if Prev_edge.Prev <> nil then - if Prev_edge.Prev.Bstate[BELow] = BUNDLE_TAIL then - Prev_edge.Bstate[BELow] := BUNDLE_HEAD; - end; - end; - end - else - begin - if EQ(Edge.Top.Y, Yt) then - Edge.Xt := Edge.Top.X - else - Edge.Xt := Edge.Bot.X + Edge.Dx * (Yt - Edge.Bot.Y); - end; - - Edge := Edge.Next; - end; - - if Scanbeam < Sbt_entries then - begin - { === SCANBEAM INTERIOR PROCESSING ============================== } - - BuildIntersection_table(It, Aet, Dy); - - { Process each node in the intersection table } - Intersect := It; - while Intersect <> nil do - begin - E0 := Intersect.Ie[0]; - E1 := Intersect.Ie[1]; - - { Only generate output for contributing intersections } - if ((E0.Bundle[ABOVE][CLIP] <> 0) or (E0.Bundle[ABOVE][SUBJ] <> 0)) and - ((E1.Bundle[ABOVE][CLIP] <> 0) or (E1.Bundle[ABOVE][SUBJ] <> 0)) then - begin - P := E0.Outp[ABOVE]; - Q := E1.Outp[ABOVE]; - Ix := Intersect.Point.X; - Iy := Intersect.Point.Y + Yb; - - Inn[CLIP] := - Integer(((E0.Bundle[ABOVE][CLIP] <> 0) and (E0.Bside[CLIP] = 0)) or - ((E1.Bundle[ABOVE][CLIP] <> 0) and (E1.Bside[CLIP] <> 0)) or - ((E0.Bundle[ABOVE][CLIP] = 0) and (E1.Bundle[ABOVE][CLIP] = 0) and - (E0.Bside[CLIP] <> 0) and (E1.Bside[CLIP] <> 0))); - - Inn[SUBJ] := - Integer(((E0.Bundle[ABOVE][SUBJ] <> 0) and (E0.Bside[SUBJ] = 0)) or - ((E1.Bundle[ABOVE][SUBJ] <> 0) and (E1.Bside[SUBJ] <> 0)) or - ((E0.Bundle[ABOVE][SUBJ] = 0) and (E1.Bundle[ABOVE][SUBJ] = 0) and - (E0.Bside[SUBJ] <> 0) and (E1.Bside[SUBJ] <> 0))); - - { Determine quadrant occupancies } - case Set_operation of - - GPC_DIFF, GPC_INT: - begin - Tr := Integer((Inn[CLIP] <> 0) and (Inn[SUBJ] <> 0)); - Tl := Integer(((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP]) <> 0) and - ((Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ]) <> 0)); - Br := Integer(((Inn[CLIP] xor E0.Bundle[ABOVE][CLIP]) <> 0) and - ((Inn[SUBJ] xor E0.Bundle[ABOVE][SUBJ]) <> 0)); - Bl := Integer - (((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP] xor E0.Bundle[ABOVE] - [CLIP]) <> 0) and - ((Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ] xor E0.Bundle[ABOVE] - [SUBJ]) <> 0)); - end; - - GPC_XOR: - begin - Tr := Integer((Inn[CLIP] <> 0) xor (Inn[SUBJ] <> 0)); - Tl := Integer((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP]) - xor (Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ])); - Br := Integer((Inn[CLIP] xor E0.Bundle[ABOVE][CLIP]) - xor (Inn[SUBJ] xor E0.Bundle[ABOVE][SUBJ])); - Bl := Integer - ((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP] xor E0.Bundle[ABOVE] - [CLIP]) xor (Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ] - xor E0.Bundle[ABOVE][SUBJ])); - end; - - GPC_UNION: - begin - Tr := Integer((Inn[CLIP] <> 0) or (Inn[SUBJ] <> 0)); - Tl := Integer(((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP]) <> 0) or - ((Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ]) <> 0)); - Br := Integer(((Inn[CLIP] xor E0.Bundle[ABOVE][CLIP]) <> 0) or - ((Inn[SUBJ] xor E0.Bundle[ABOVE][SUBJ]) <> 0)); - Bl := Integer - (((Inn[CLIP] xor E1.Bundle[ABOVE][CLIP] xor E0.Bundle[ABOVE] - [CLIP]) <> 0) or - ((Inn[SUBJ] xor E1.Bundle[ABOVE][SUBJ] xor E0.Bundle[ABOVE] - [SUBJ]) <> 0)); - end; - end; { case } - - _class := Tr + (Tl shl 1) + (Br shl 2) + (Bl shl 3); - - case Tvertex_type(_class) of - EMN: - begin - Add_local_min(@Out_poly, E0, Ix, Iy); - E1.Outp[ABOVE] := E0.Outp[ABOVE]; - end; - ERI: - begin - if P <> nil then - begin - Add_right(P, Ix, Iy); - E1.Outp[ABOVE] := P; - E0.Outp[ABOVE] := nil; - end; - end; - ELI: - begin - if Q <> nil then - begin - Add_left(Q, Ix, Iy); - E0.Outp[ABOVE] := Q; - E1.Outp[ABOVE] := nil; - end; - end; - EMX: - begin - if (P <> nil) and (Q <> nil) then - begin - Add_left(P, Ix, Iy); - Merge_right(P, Q, Out_poly); - E0.Outp[ABOVE] := nil; - E1.Outp[ABOVE] := nil; - end; - end; - IMN: - begin - Add_local_min(@Out_poly, E0, Ix, Iy); - E1.Outp[ABOVE] := E0.Outp[ABOVE]; - end; - ILI: - begin - if P <> nil then - begin - Add_left(P, Ix, Iy); - E1.Outp[ABOVE] := P; - E0.Outp[ABOVE] := nil; - end; - end; - IRI: - begin - if Q <> nil then - begin - Add_right(Q, Ix, Iy); - E0.Outp[ABOVE] := Q; - E1.Outp[ABOVE] := nil; - end; - end; - IMX: - begin - if (P <> nil) and (Q <> nil) then - begin - Add_right(P, Ix, Iy); - Merge_left(P, Q, Out_poly); - E0.Outp[ABOVE] := nil; - E1.Outp[ABOVE] := nil; - end; - end; - IMM: - begin - if (P <> nil) and (Q <> nil) then - begin - Add_right(P, Ix, Iy); - Merge_left(P, Q, Out_poly); - Add_local_min(@Out_poly, E0, Ix, Iy); - E1.Outp[ABOVE] := E0.Outp[ABOVE]; - end; - end; - EMM: - begin - if (P <> nil) and (Q <> nil) then - begin - Add_left(P, Ix, Iy); - Merge_right(P, Q, Out_poly); - Add_local_min(@Out_poly, E0, Ix, Iy); - E1.Outp[ABOVE] := E0.Outp[ABOVE]; - end; - end; - else - end; { End of case } - end; { End of contributing intersection conditional } - - { Swap bundle sides in response to edge crossing } - if (E0.Bundle[ABOVE][CLIP] <> 0) then - E1.Bside[CLIP] := Integer(E1.Bside[CLIP] = 0); - if (E1.Bundle[ABOVE][CLIP] <> 0) then - E0.Bside[CLIP] := Integer(E0.Bside[CLIP] = 0); - if (E0.Bundle[ABOVE][SUBJ] <> 0) then - E1.Bside[SUBJ] := Integer(E1.Bside[SUBJ] = 0); - if (E1.Bundle[ABOVE][SUBJ] <> 0) then - E0.Bside[SUBJ] := Integer(E0.Bside[SUBJ] = 0); - - { Swap e0 and e1 bundles in the AET } - Prev_edge := E0.Prev; - Next_edge := E1.Next; - if Next_edge <> nil then - Next_edge.Prev := E0; - - if E0.Bstate[ABOVE] = BUNDLE_HEAD then - begin - Search := FTRUE; - while Search <> 0 do - begin - Prev_edge := Prev_edge.Prev; - if Prev_edge <> nil then - begin - if Prev_edge.Bstate[ABOVE] <> BUNDLE_TAIL then - Search := FFALSE; - end - else - Search := FFALSE; - end; - end; - if Prev_edge = nil then - begin - Aet.Prev := E1; - E1.Next := Aet; - Aet := E0.Next; - end - else - begin - Prev_edge.Next.Prev := E1; - E1.Next := Prev_edge.Next; - Prev_edge.Next := E0.Next; - end; - E0.Next.Prev := Prev_edge; - E1.Next.Prev := E1; - E0.Next := Next_edge; - - Intersect := Intersect.Next; - end; { End of IT loop } - - { Prepare for next scanbeam } - Edge := Aet; - while Edge <> nil do - begin - Next_edge := Edge.Next; - Succ_edge := Edge.Succ; - - if EQ(Edge.Top.Y, Yt) and (Succ_edge <> nil) then - begin - { Replace AET edge by its successor } - Succ_edge.Outp[BELow] := Edge.Outp[ABOVE]; - Succ_edge.Bstate[BELow] := Edge.Bstate[ABOVE]; - Succ_edge.Bundle[BELow][CLIP] := Edge.Bundle[ABOVE][CLIP]; - Succ_edge.Bundle[BELow][SUBJ] := Edge.Bundle[ABOVE][SUBJ]; - Prev_edge := Edge.Prev; - if Prev_edge <> nil then - Prev_edge.Next := Succ_edge - else - Aet := Succ_edge; - if Next_edge <> nil then - Next_edge.Prev := Succ_edge; - Succ_edge.Prev := Prev_edge; - Succ_edge.Next := Next_edge; - end - else - begin - { Update this edge } - Edge.Outp[BELow] := Edge.Outp[ABOVE]; - Edge.Bstate[BELow] := Edge.Bstate[ABOVE]; - Edge.Bundle[BELow][CLIP] := Edge.Bundle[ABOVE][CLIP]; - Edge.Bundle[BELow][SUBJ] := Edge.Bundle[ABOVE][SUBJ]; - Edge.Xb := Edge.Xt; - end; - Edge.Outp[ABOVE] := nil; - Edge := Next_edge; - end; - end; - end; { === END OF SCANBEAM PROCESSING ================================== } - - { Generate result polygon from out_poly } - Result_polygon.Contour := nil; - Result_polygon.Num_contours := Count_contours(Out_poly); - if Result_polygon.Num_contours > 0 then - begin - MALLOC(Pointer(Result_polygon.Hole), Result_polygon.Num_contours * - SizeOf(Integer), 'hole flag table creation'); - MALLOC(Pointer(Result_polygon.Contour), Result_polygon.Num_contours * - SizeOf(Tgpc_vertex_list), 'contour creation'); - Poly := Out_poly; - C := 0; - - while Poly <> nil do - begin - Npoly := Poly.Next; - if Poly.Active <> 0 then - begin - Result_polygon.Hole[C] := Poly.Proxy.Hole; - Result_polygon.Contour[C].NumVertices := Poly.Active; - MALLOC(Pointer(Result_polygon.Contour[C].Vertex), - Result_polygon.Contour[C].NumVertices * SizeOf(Tgpc_vertex), - 'vertex creation'); - - V := Result_polygon.Contour[C].NumVertices - 1; - Vtx := Poly.Proxy.V[LEFT]; - while Vtx <> nil do - begin - Nv := Vtx.Next; - Result_polygon.Contour[C].Vertex[V].X := Vtx.X; - Result_polygon.Contour[C].Vertex[V].Y := Vtx.Y; - FREE(Pointer(Vtx)); - Dec(V); - Vtx := Nv; - end; - Inc(C); - end; - FREE(Pointer(Poly)); - Poly := Npoly; - end; - end; - - { Tidy up } - Reset_it(It); - Reset_lmt(Lmt); - FREE(Pointer(C_heap)); - FREE(Pointer(S_heap)); - FREE(Pointer(Sbt)); -end; - -procedure Gpc_free_tristrip(Tristrip: Pgpc_tristrip); -var - S: Integer; -begin - for S := 0 to Tristrip.Num_strips - 1 do - CFREE(Pointer(Tristrip.Strip[S].Vertex)); - CFREE(Pointer(Tristrip.Strip)); - Tristrip.Num_strips := 0; -end; - - - - - - - -// =========================================================================== -// End of file: gpc.pas -// =========================================================================== - -end. diff --git a/Source/Agg2D.pas b/Source/Agg2D.pas old mode 100644 new mode 100755 index 4e1db1e..b151741 --- a/Source/Agg2D.pas +++ b/Source/Agg2D.pas @@ -26,8 +26,24 @@ interface {$I AggCompiler.inc} -// With this define uncommented you can use FreeType font engine -{-$DEFINE AGG2D_USE_FREETYPE} +{.$DEFINE AGG2D_USE_RASTERFONTS } +{$DEFINE AGG2D_USE_FREETYPE } +{.$DEFINE AGG2D_USE_WINFONTS } + +{$IFDEF AGG2D_USE_RASTERFONTS} + {$UNDEF AGG2D_USE_FREETYPE} + {$UNDEF AGG2D_USE_WINFONTS} +{$ENDIF} + +{$IFDEF AGG2D_USE_FREETYPE} + {$UNDEF AGG2D_USE_WINFONTS} + {$UNDEF AGG2D_USE_RASTERFONTS} +{$ENDIF} + +{$IFDEF AGG2D_USE_WINFONTS} + {$UNDEF AGG2D_USE_FREETYPE} + {$UNDEF AGG2D_USE_RASTERFONTS} +{$ENDIF} uses AggBasics, @@ -51,7 +67,7 @@ interface AggSpanAllocator, AggRasterizerScanLineAA, AggGammaFunctions, - AggScanlineUnpacked, + AggScanLineUnpacked, AggArc, AggBezierArc, AggRoundedRect, @@ -64,47 +80,92 @@ interface AggImageFilters, AggVertexSource, AggRenderScanLines, - -{$IFDEF AGG2D_USE_FREETYPE} + AggBlur, + {$IFDEF AGG2D_USE_FREETYPE} AggFontFreeType, -{$ELSE} + {$ENDIF} + {$IFDEF AGG2D_USE_WINFONTS} AggFontWin32TrueType, Windows, + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + AggEmbeddedRasterFonts , + AggGlyphRasterBin , + AggRendererRasterText , + {$ENDIF} + Math, + SysUtils; + +{$IFDEF AGG2D_USE_RASTERFONTS} +type + TFontRecord = record + Font: PInt8u; + Name: AnsiString; + end; + +const + Fonts: array [0..34] of TFontRecord = ( + (Font: @CAggGse4x6; name: 'Gse4x6'), + (Font: @CAggGse4x8; name: 'Gse4x8'), + (Font: @CAggGse5x7; name: 'Gse5x7'), + (Font: @CAggGse5x9; name: 'Gse5x9'), + (Font: @CAggGse6x9; name: 'Gse6x9'), + (Font: @CAggGse6x12; name: 'Gse6x12'), + (Font: @CAggGse7x11; name: 'Gse7x11'), + (Font: @CAggGse7x11Bold; name: 'Gse7x11Bold'), + (Font: @CAggGse7x15; name: 'Gse7x15'), + (Font: @CAggGse7x15Bold; name: 'Gse7x15Bold'), + (Font: @CAggGse8x16; name: 'Gse8x16'), + (Font: @CAggGse8x16Bold; name: 'Gse8x16Bold'), + (Font: @CAggMcs11Prop; name: 'Mcs11Prop'), + (Font: @CAggMcs11PropCondensed; name: 'Mcs11PropCondensed'), + (Font: @CAggMcs12Prop; name: 'Mcs12Prop'), + (Font: @CAggMcs13Prop; name: 'Mcs13Prop'), + (Font: @CAggMcs5x10Mono; name: 'Mcs5x10Mono'), + (Font: @CAggMcs5x11Mono; name: 'Mcs5x11Mono'), + (Font: @CAggMcs6x10Mono; name: 'Mcs6x10Mono'), + (Font: @CAggMcs6x11Mono; name: 'Mcs6x11Mono'), + (Font: @CAggMcs7x12MonoHigh; name: 'Mcs7x12MonoHigh'), + (Font: @CAggMcs7x12MonoLow; name: 'Mcs7x12MonoLow'), + (Font: @CAggVerdana12; name: 'Verdana12'), + (Font: @CAggVerdana12Bold; name: 'Verdana12Bold'), + (Font: @CAggVerdana13; name: 'Verdana13'), + (Font: @CAggVerdana13Bold; name: 'Verdana13Bold'), + (Font: @CAggVerdana14; name: 'Verdana14'), + (Font: @CAggVerdana14Bold; name: 'Verdana14Bold'), + (Font: @CAggVerdana16; name: 'Verdana16'), + (Font: @CAggVerdana16Bold; name: 'Verdana16Bold'), + (Font: @CAggVerdana17; name: 'Verdana17'), + (Font: @CAggVerdana17Bold; name: 'Verdana17Bold'), + (Font: @CAggVerdana18; name: 'Verdana18'), + (Font: @CAggVerdana18Bold; name: 'Verdana18Bold'), + (Font: nil; name: '')); + + DefaultRasterFontName : AnsiString = 'Verdana14'; + {$ENDIF} - Math; + type TAggPixelFormat = (pfRGBA, pfBGRA); PAggColorRgba8 = ^TAggColorRgba8; TAggColorRgba8 = TAggRgba8; - TAggFontRasterizer = TAggGray8Adaptor; - TAggFontScanLine = TAggGray8ScanLine; - -{$IFDEF AGG2D_USE_FREETYPE } + {$IFDEF AGG2D_USE_FREETYPE } TAggFontEngine = TAggFontEngineFreetypeInt32; -{$ELSE} + {$ENDIF} + {$IFDEF AGG2D_USE_WINFONTS} TAggFontEngine = TAggFontEngineWin32TrueTypeInt32; -{$ENDIF} - + {$ENDIF} TAggGradient = (grdSolid, grdLinear, grdRadial); TAggDirection = (dirCW, dirCCW); - TAggTextAlignmentHorizontal = (tahLeft, tahRight, tahCenter); TAggTextAlignmentVertical = (tavTop, tavBottom, tavCenter); - - TAggDrawPathFlag = (dpfFillOnly, dpfStrokeOnly, dpfFillAndStroke, - dpfFillWithHorizontalLineColor); - - TAggViewportOption = (voAnisotropic, voXMinYMin, voXMidYMin, voXMaxYMin, - voXMinYMid, voXMidYMid, voXMaxYMid, voXMinYMax, voXMidYMax, voXMaxYMax); - - TAggImageFilterType = (ifNoFilter, ifBilinear, ifHanning, ifHermite, ifQuadric, - ifBicubic, ifCatrom, ifSpline16, ifSpline36, ifBlackman144); - + TAggDrawPathFlag = (dpfFillOnly, dpfStrokeOnly, dpfFillAndStroke, dpfFillWithHorizontalLineColor); + TAggViewportOption = (voAnisotropic, voXMinYMin, voXMidYMin, voXMaxYMin, voXMinYMid, voXMidYMid, voXMaxYMid, voXMinYMax, voXMidYMax, voXMaxYMax); + TAggImageFilterType = (ifNoFilter, ifBilinear, ifHanning, ifHermite, ifQuadric, ifBicubic, ifCatrom, ifSpline16, ifSpline36, ifBlackman144); TAggImageResample = (irNever, irAlways, irOnZoomOut); - TAggFontCache = (fcRaster, fcVector); PAggTransformations = ^TAggTransformations; @@ -115,20 +176,16 @@ TAggTransformations = record TAgg2DImage = class private FRenderingBuffer: TAggRenderingBuffer; + FPixelFormat: TAggPixelFormat; function GetWidth: Integer; function GetHeight: Integer; function GetScanLine(Index: Cardinal): Pointer; public - constructor Create(Buffer: PInt8u; AWidth, AHeight: Cardinal; - Stride: Integer); + constructor Create(Buffer: PInt8u; AWidth, AHeight: Cardinal; Stride: Integer; PixelFormat: TAggPixelFormat = pfBGRA); destructor Destroy; override; - - procedure Attach(Buffer: PInt8u; AWidth, AHeight: Cardinal; - Stride: Integer); - + procedure Attach(Buffer: PInt8u; AWidth, AHeight: Cardinal; Stride: Integer); procedure PreMultiply; procedure DeMultiply; - property ScanLine[Index: Cardinal]: Pointer read GetScanLine; property Width: Integer read GetWidth; property Height: Integer read GetHeight; @@ -141,96 +198,75 @@ TAgg2DRasterizerGamma = class(TAggVertexSource) public constructor Create(Alpha, Gamma: Double); destructor Destroy; override; - function FuncOperatorGamma(X: Double): Double; override; end; TAgg2D = class private FRenderingBuffer: TAggRenderingBuffer; - FRendererBase: TAggRendererBase; FRendererBaseComp: TAggRendererBase; FRendererBasePre: TAggRendererBase; FRendererBaseCompPre: TAggRendererBase; - FRendererSolid: TAggRendererScanLineAASolid; FRendererSolidComp: TAggRendererScanLineAASolid; - FAllocator: TAggSpanAllocator; FClipBox: TRectDouble; - FBlendMode: TAggBlendMode; FImageBlendMode: TAggBlendMode; - FScanLine: TAggScanLineUnpacked8; FRasterizer: TAggRasterizerScanLineAA; - FMasterAlpha: Double; FAntiAliasGamma: Double; - FFillGradient: TAggPodAutoArray; FLineGradient: TAggPodAutoArray; - FLineCap: TAggLineCap; FLineJoin: TAggLineJoin; - FFillGradientFlag: TAggGradient; FLineGradientFlag: TAggGradient; - FFillGradientMatrix: TAggTransAffine; FLineGradientMatrix: TAggTransAffine; - FFillGradientD1: Double; FLineGradientD1: Double; FFillGradientD2: Double; FLineGradientD2: Double; - FTextAngle: Double; - FTextAlignX: TAggTextAlignmentHorizontal; FTextAlignY: TAggTextAlignmentVertical; - FTextHints: Boolean; FFontHeight: Double; FFontAscent: Double; FFontDescent: Double; FFontCacheType: TAggFontCache; - FImageFilter: TAggImageFilterType; FImageResample: TAggImageResample; FImageFilterLUT: TAggImageFilter; - FFillGradientInterpolator: TAggSpanInterpolatorLinear; FLineGradientInterpolator: TAggSpanInterpolatorLinear; - FLinearGradientFunction: TAggGradientX; FRadialGradientFunction: TAggGradientCircle; - FLineWidth: Double; FEvenOddFlag: Boolean; - FPath: TAggPathStorage; FTransform: TAggTransAffine; - FConvCurve : TAggConvCurve; FConvDash: TAggConvDash; FConvStroke: TAggConvStroke; - FPathTransform: TAggConvTransform; FStrokeTransform: TAggConvTransform; - -{$IFNDEF AGG2D_USE_FREETYPE} + {$IFDEF AGG2D_USE_WINFONTS} FFontDC: HDC; -{$ENDIF} - + {$ENDIF} + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} FFontEngine: TAggFontEngine; FFontCacheManager: TAggFontCacheManager; - - // Other Pascal-specific members + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + FFontGlyph: TAggGlyphRasterBin; + FFontFlipY: Boolean; + {$ENDIF} FGammaNone: TAggGammaNone; FGammaAgg2D: TAgg2DRasterizerGamma; - FImageFilterBilinear: TAggImageFilterBilinear; FImageFilterHanning: TAggImageFilterHanning; FImageFilterHermite: TAggImageFilterHermite; @@ -243,20 +279,13 @@ TAgg2D = class procedure Render(AFillColor: Boolean); overload; procedure Render(Ras: TAggFontRasterizer; Sl: TAggFontScanLine); overload; - procedure AddLine(X1, Y1, X2, Y2: Double); procedure AddEllipse(Cx, Cy, Rx, Ry: Double; Dir: TAggDirection); overload; - procedure AddEllipse(Center, Radius: TPointDouble; Dir: TAggDirection); - overload; - - procedure RenderImage(Img: TAgg2DImage; X1, Y1, X2, Y2: Integer; - Parl: PDouble); overload; - procedure RenderImage(Img: TAgg2DImage; Rect: TRectInteger; - Parl: PDouble); overload; + procedure AddEllipse(Center, Radius: TPointDouble; Dir: TAggDirection); overload; + procedure RenderImage(Img: TAgg2DImage; X1, Y1, X2, Y2: Integer; Parl: PDouble); overload; + procedure RenderImage(Img: TAgg2DImage; Rect: TRectInteger; Parl: PDouble); overload; procedure SetImageFilter(F: TAggImageFilterType); - function GetFlipText: Boolean; - procedure SetImageResample(F: TAggImageResample); overload; procedure SetTextHints(Value: Boolean); overload; procedure SetLineCap(Cap: TAggLineCap); overload; @@ -276,16 +305,13 @@ TAgg2D = class FImageBlendColor: TAggColorRgba8; FFillColor: TAggColorRgba8; FLineColor: TAggColorRgba8; - FPixelFormat: TAggPixelFormat; FPixelFormatProc: TAggPixelFormatProcessor; FPixelFormatComp: TAggPixelFormatProcessor; FPixelFormatPre: TAggPixelFormatProcessor; FPixelFormatCompPre: TAggPixelFormatProcessor; - procedure UpdateApproximationScale; procedure UpdateRasterizerGamma; - property RenderingBuffer: TAggRenderingBuffer read FRenderingBuffer; property RendererBase: TAggRendererBase read FRendererBase; property RendererBaseComp: TAggRendererBase read FRendererBaseComp; @@ -295,213 +321,120 @@ TAgg2D = class property Path: TAggPathStorage read FPath; public constructor Create(PixelFormat: TAggPixelFormat = pfBGRA); overload; virtual; - constructor Create(Buffer: PInt8u; Width, Height: Cardinal; - Stride: Integer; PixelFormat: TAggPixelFormat = pfBGRA); overload; virtual; + constructor Create(Buffer: PInt8u; Width, Height: Cardinal; Stride: Integer; PixelFormat: TAggPixelFormat = pfBGRA); overload; virtual; destructor Destroy; override; - - // Setup - procedure Attach(Buffer: PInt8u; Width, Height: Cardinal; - Stride: Integer); overload; - procedure Attach(Img: TAgg2DImage); overload; - + procedure Attach(Buffer: PInt8u; Width, Height: Cardinal; Stride: Integer); overload; + procedure Attach(Img: TAgg2DImage); overload; procedure ClipBox(X1, Y1, X2, Y2: Double); overload; function ClipBox: TRectDouble; overload; - procedure ClearAll(C: TAggColorRgba8); overload; procedure ClearAll(R, G, B: Cardinal; A: Cardinal = 255); overload; - + procedure FillAll(C: TAggColorRgba8); overload; + procedure FillAll(R, G, B: Cardinal; A: Cardinal = 255); overload; procedure ClearClipBox(C: TAggColorRgba8); overload; procedure ClearClipBox(R, G, B: Cardinal; A: Cardinal = 255); overload; - - // Conversions procedure WorldToScreen(X, Y: PDouble); overload; procedure WorldToScreen(var X, Y: Double); overload; procedure ScreenToWorld(X, Y: PDouble); overload; procedure ScreenToWorld(var X, Y: Double); overload; function WorldToScreen(Scalar: Double): Double; overload; function ScreenToWorld(Scalar: Double): Double; overload; - procedure AlignPoint(X, Y: PDouble); overload; procedure AlignPoint(var X, Y: Double); overload; - function InBox(WorldX, WorldY: Double): Boolean; overload; function InBox(World: TPointDouble): Boolean; overload; - - // General Attributes procedure SetFillColor(R, G, B: Cardinal; A: Cardinal = 255); overload; procedure SetLineColor(R, G, B: Cardinal; A: Cardinal = 255); overload; procedure SetImageBlendColor(R, G, B: Cardinal; A: Cardinal = 255); overload; procedure NoFill; procedure NoLine; - - procedure FillLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); - procedure LineLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); - - procedure FillRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); overload; - procedure LineRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); overload; - + procedure FillLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); + procedure LineLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); + procedure FillRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); overload; + procedure LineRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); overload; procedure FillRadialGradient(X, Y, R: Double; C1, C2, C3: TAggColorRgba8); overload; procedure LineRadialGradient(X, Y, R: Double; C1, C2, C3: TAggColorRgba8); overload; - procedure FillRadialGradient(X, Y, R: Double); overload; procedure LineRadialGradient(X, Y, R: Double); overload; - procedure RemoveAllDashes; procedure AddDash(DashLength, GapLength: Double); - - // Transformations function GetTransformations: TAggTransformations; procedure SetTransformations(var Tr: TAggTransformations); overload; procedure SetTransformations(V0, V1, V2, V3, V4, V5: Double); overload; procedure ResetTransformations; - procedure Affine(Tr: TAggTransAffine); overload; procedure Affine(var Tr: TAggTransformations); overload; - procedure Rotate(Angle: Double); procedure Scale(Sx, Sy: Double); procedure Skew(Sx, Sy: Double); procedure Translate(X, Y: Double); - procedure Parallelogram(X1, Y1, X2, Y2: Double; Para: PDouble); - - procedure Viewport(WorldX1, WorldY1, WorldX2, WorldY2, ScreenX1, ScreenY1, - ScreenX2, ScreenY2: Double; Opt: TAggViewportOption = voXMidYMid); overload; - procedure Viewport(World, Screen: TRectDouble; Opt: TAggViewportOption = - voXMidYMid); overload; - - // Basic Shapes - procedure Line(X1, Y1, X2, Y2: Double); + procedure Viewport(WorldX1, WorldY1, WorldX2, WorldY2, ScreenX1, ScreenY1, ScreenX2, ScreenY2: Double; Opt: TAggViewportOption = voXMidYMid); overload; + procedure Viewport(World, Screen: TRectDouble; Opt: TAggViewportOption = voXMidYMid); overload; + procedure Line(X1, Y1, X2, Y2: Double; AFixAlignment: Boolean = False); overload; procedure Triangle(X1, Y1, X2, Y2, X3, Y3: Double); - procedure Rectangle(X1, Y1, X2, Y2: Double); - + procedure Rectangle(X1, Y1, X2, Y2: Double; AFixAlignment: Boolean = False); overload; procedure RoundedRect(X1, Y1, X2, Y2, R: Double); overload; procedure RoundedRect(Rect: TRectDouble; R: Double); overload; procedure RoundedRect(X1, Y1, X2, Y2, Rx, Ry: Double); overload; procedure RoundedRect(Rect: TRectDouble; Rx, Ry: Double); overload; - procedure RoundedRect(X1, Y1, X2, Y2, RxBottom, RyBottom, RxTop, - RyTop: Double); overload; - + procedure RoundedRect(X1, Y1, X2, Y2, RxBottom, RyBottom, RxTop, RyTop: Double); overload; procedure Ellipse(Cx, Cy, Rx, Ry: Double); procedure Circle(Cx, Cy, Radius: Double); - procedure Arc(Cx, Cy, Rx, Ry, Start, Sweep: Double); procedure Star(Cx, Cy, R1, R2, StartAngle: Double; NumRays: Integer); - procedure Curve(X1, Y1, X2, Y2, X3, Y3: Double); overload; procedure Curve(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Double); overload; - - procedure Polygon(Xy: PPointDouble; NumPoints: Integer; - Flag: TAggDrawPathFlag = dpfFillAndStroke); + procedure Polygon(Xy: PPointDouble; NumPoints: Integer; Flag: TAggDrawPathFlag = dpfFillAndStroke); procedure Polyline(Xy: PPointDouble; NumPoints: Integer); - - // Text - procedure Font(FileName: PAnsiChar; Height: Double; Bold: Boolean = False; - Italic: Boolean = False; Ch: TAggFontCache = fcRaster; Angle: Double = 0); - + procedure Font(FileName: PAnsiChar; Height: Double; Bold: Boolean = False; Italic: Boolean = False; Ch: TAggFontCache = fcRaster; Angle: Double = 0); function FontHeight: Double; - - procedure TextAlignment(AlignX: TAggTextAlignmentHorizontal; - AlignY: TAggTextAlignmentVertical); - + procedure TextAlignment(AlignX: TAggTextAlignmentHorizontal; AlignY: TAggTextAlignmentVertical); function TextWidth(Str: PAnsiChar): Double; overload; function TextWidth(Str: AnsiString): Double; overload; - - procedure Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; - Ddx: Double = 0; Ddy: Double = 0); overload; - procedure Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean = False; - Ddx: Double = 0; Ddy: Double = 0); overload; - - // Path commands + procedure Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; Ddx: Double = 0; Ddy: Double = 0); overload; + procedure Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean = False; Ddx: Double = 0; Ddy: Double = 0); overload; procedure ResetPath; - procedure MoveTo(X, Y: Double); procedure MoveRel(Dx, Dy: Double); - procedure LineTo(X, Y: Double); procedure LineRel(Dx, Dy: Double); - procedure HorizontalLineTo(X: Double); procedure HorizontalLineRel(Dx: Double); - procedure VerticalLineTo(Y: Double); procedure VerticalLineRel(Dy: Double); - - procedure ArcTo(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; - X, Y: Double); overload; - procedure ArcRel(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; - Dx, Dy: Double); overload; - + procedure ArcTo(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; X, Y: Double); overload; + procedure ArcRel(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; Dx, Dy: Double); overload; procedure QuadricCurveTo(XCtrl, YCtrl, XTo, YTo: Double); overload; procedure QuadricCurveRel(DxCtrl, DyCtrl, DxTo, DyTo: Double); overload; procedure QuadricCurveTo(XTo, YTo: Double); overload; procedure QuadricCurveRel(DxTo, DyTo: Double); overload; - - procedure CubicCurveTo(XCtrl1, YCtrl1, XCtrl2, YCtrl2, XTo, - YTo: Double); overload; - procedure CubicCurveRel(DxCtrl1, DyCtrl1, DxCtrl2, DyCtrl2, DxTo, - DyTo: Double); overload; + procedure CubicCurveTo(XCtrl1, YCtrl1, XCtrl2, YCtrl2, XTo, YTo: Double); overload; + procedure CubicCurveRel(DxCtrl1, DyCtrl1, DxCtrl2, DyCtrl2, DxTo, DyTo: Double); overload; procedure CubicCurveTo(XCtrl2, YCtrl2, XTo, YTo: Double); overload; procedure CubicCurveRel(XCtrl2, YCtrl2, XTo, YTo: Double); overload; - procedure ClosePolygon; - procedure DrawPath(Flag: TAggDrawPathFlag = dpfFillAndStroke); procedure DrawPathNoTransform(Flag: TAggDrawPathFlag = dpfFillAndStroke); - - // Image Transformations - procedure TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, - ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); overload; - procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; - DstX1, DstY1, DstX2, DstY2: Double); overload; - procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Destination: TRectDouble); overload; - - procedure TransformImage(Img: TAgg2DImage; - DstX1, DstY1, DstX2, DstY2: Double); overload; - procedure TransformImage(Img: TAgg2DImage; - Destination: TRectDouble); overload; - - procedure TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, - ImgY2: Integer; Parallelogram: PDouble); overload; - procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Parallelogram: PDouble); overload; - + procedure TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); overload; + procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; DstX1, DstY1, DstX2, DstY2: Double); overload; + procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; Destination: TRectDouble); overload; + procedure TransformImage(Img: TAgg2DImage; DstX1, DstY1, DstX2, DstY2: Double); overload; + procedure TransformImage(Img: TAgg2DImage; Destination: TRectDouble); overload; + procedure TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); overload; + procedure TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; Parallelogram: PDouble); overload; procedure TransformImage(Img: TAgg2DImage; Parallelogram: PDouble); overload; - - procedure TransformImagePath(Img: TAgg2DImage; - ImgX1, ImgY1, ImgX2, ImgY2: Integer; - DstX1, DstY1, DstX2, DstY2: Double); overload; - - procedure TransformImagePath(Img: TAgg2DImage; - DstX1, DstY1, DstX2, DstY2: Double); overload; - - procedure TransformImagePath(Img: TAgg2DImage; - ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); overload; - - procedure TransformImagePath(Img: TAgg2DImage; - Parallelogram: PDouble); overload; - - // Image Blending (no transformations available) - procedure BlendImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; - DstX, DstY: Double; Alpha: Cardinal = 255); overload; - - procedure BlendImage(Img: TAgg2DImage; DstX, DstY: Double; - Alpha: Cardinal = 255); overload; - - // Copy image directly, together with alpha-channel - procedure CopyImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; - DstX, DstY: Double); overload; - procedure CopyImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Destination: TPointDouble); overload; - + procedure TransformImagePath(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); overload; + procedure TransformImagePath(Img: TAgg2DImage; DstX1, DstY1, DstX2, DstY2: Double); overload; + procedure TransformImagePath(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); overload; + procedure TransformImagePath(Img: TAgg2DImage; Parallelogram: PDouble); overload; + procedure BlendImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX, DstY: Double; Alpha: Cardinal = 255); overload; + procedure BlendImage(Img: TAgg2DImage; DstX, DstY: Double; Alpha: Cardinal = 255); overload; + procedure CopyImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX, DstY: Double); overload; + procedure CopyImage(Img: TAgg2DImage; ImgRect: TRectInteger; Destination: TPointDouble); overload; procedure CopyImage(Img: TAgg2DImage; DstX, DstY: Double); overload; procedure CopyImage(Img: TAgg2DImage; Destination: TPointDouble); overload; - + procedure Blur(RX, RY: Cardinal); property AntiAliasGamma: Double read FAntiAliasGamma write SetAntiAliasGamma; property ImageBlendColor: TAggColorRgba8 read FImageBlendColor write SetImageBlendColor; property FillColor: TAggColorRgba8 read FFillColor write SetFillColor; @@ -518,7 +451,6 @@ TAgg2D = class property VerticalTextAlignment: TAggTextAlignmentVertical read FTextAlignY write FTextAlignY; property ImageResample: TAggImageResample read FImageResample write SetImageResample; property Row[Y: Cardinal]: PInt8U read GetRow; - property ImageBlendMode: TAggBlendMode read FImageBlendMode write SetImageBlendMode; property MasterAlpha: Double read FMasterAlpha write SetMasterAlpha; end; @@ -527,40 +459,32 @@ TAggSpanConvImageBlend = class(TAggSpanConvertor) private FMode : TAggBlendMode; FColor: TAggColorRgba8; - FPixel: TAggPixelFormatProcessor; // FPixelFormatCompPre + FPixel: TAggPixelFormatProcessor; public constructor Create(BlendMode: TAggBlendMode; C: TAggColorRgba8; P: TAggPixelFormatProcessor); - procedure Convert(Span: PAggColor; X, Y: Integer; Len: Cardinal); override; end; function OperatorIsEqual(C1, C2: PAggColorRgba8): Boolean; function OperatorIsNotEqual(C1, C2: PAggColorRgba8): Boolean; - -procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; - RenSolid: TAggRendererScanLineAASolid; FillColor: Boolean); overload; - -procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; - RenSolid: TAggRendererScanLineAASolid; Ras: TAggGray8Adaptor; - Sl: TAggGray8ScanLine); overload; - -procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; - RendererBase: TAggRendererBase; Interpolator: TAggSpanInterpolatorLinear); - +procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; RenSolid: TAggRendererScanLineAASolid; FillColor: Boolean); overload; +procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; RenSolid: TAggRendererScanLineAASolid; Ras: TAggGray8Adaptor; Sl: TAggGray8ScanLine); overload; +procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; RendererBase: TAggRendererBase; Interpolator: TAggSpanInterpolatorLinear); function Agg2DUsesFreeType: Boolean; +function Agg2DUsesWin32TrueType: Boolean; +function Agg2DUsesRasterType: Boolean; implementation var - GApproxScale: Double = 2; - + GApproxScale: Double = 2.0; { TAgg2DImage } -constructor TAgg2DImage.Create(Buffer: PInt8u; AWidth, AHeight: Cardinal; - Stride: Integer); +constructor TAgg2DImage.Create(Buffer: PInt8u; AWidth, AHeight: Cardinal; Stride: Integer; PixelFormat: TAggPixelFormat = pfBGRA); begin FRenderingBuffer := TAggRenderingBuffer.Create(Buffer, AWidth, AHeight, Stride); + FPixelFormat := PixelFormat; end; destructor TAgg2DImage.Destroy; @@ -593,7 +517,16 @@ procedure TAgg2DImage.PreMultiply; var PixelFormatProcessor: TAggPixelFormatProcessor; begin - PixelFormatRgba32(PixelFormatProcessor, FRenderingBuffer); + case FPixelFormat of + pfRGBA: + begin + PixelFormatRgba32(PixelFormatProcessor, FRenderingBuffer); + end; + pfBGRA: + begin + PixelFormatBgra32(PixelFormatProcessor, FRenderingBuffer); + end; + end; PixelFormatProcessor.PreMultiply; end; @@ -601,11 +534,19 @@ procedure TAgg2DImage.DeMultiply; var PixelFormatProcessor: TAggPixelFormatProcessor; begin - PixelFormatRgba32(PixelFormatProcessor, FRenderingBuffer); + case FPixelFormat of + pfRGBA: + begin + PixelFormatRgba32(PixelFormatProcessor, FRenderingBuffer); + end; + pfBGRA: + begin + PixelFormatBgra32(PixelFormatProcessor, FRenderingBuffer); + end; + end; PixelFormatProcessor.DeMultiply; end; - { TAgg2DRasterizerGamma } constructor TAgg2DRasterizerGamma.Create(Alpha, Gamma: Double); @@ -627,7 +568,6 @@ function TAgg2DRasterizerGamma.FuncOperatorGamma(X: Double): Double; Result := FAlpha.FuncOperatorGamma(FGamma.FuncOperatorGamma(X)); end; - { TAgg2D } constructor TAgg2D.Create(PixelFormat: TAggPixelFormat = pfBGRA); @@ -641,20 +581,16 @@ constructor TAgg2D.Create(PixelFormat: TAggPixelFormat = pfBGRA); pfRGBA: begin PixelFormatRgba32(FPixelFormatProc, FRenderingBuffer); - PixelFormatCustomBlendRgba(FPixelFormatComp, FRenderingBuffer, - @BlendModeAdaptorRgba, CAggOrderRgba); + PixelFormatCustomBlendRgba(FPixelFormatComp, FRenderingBuffer, @BlendModeAdaptorRgba, CAggOrderRgba); PixelFormatRgba32(FPixelFormatPre, FRenderingBuffer); - PixelFormatCustomBlendRgba(FPixelFormatCompPre, FRenderingBuffer, - @BlendModeAdaptorRgba, CAggOrderRgba); + PixelFormatCustomBlendRgba(FPixelFormatCompPre, FRenderingBuffer, @BlendModeAdaptorRgba, CAggOrderRgba); end; pfBGRA: begin PixelFormatBgra32(FPixelFormatProc, FRenderingBuffer); - PixelFormatCustomBlendRgba(FPixelFormatComp, FRenderingBuffer, - @BlendModeAdaptorRgba, CAggOrderBgra); + PixelFormatCustomBlendRgba(FPixelFormatComp, FRenderingBuffer, @BlendModeAdaptorRgba, CAggOrderBgra); PixelFormatBgra32(FPixelFormatPre, FRenderingBuffer); - PixelFormatCustomBlendRgba(FPixelFormatCompPre, FRenderingBuffer, - @BlendModeAdaptorRgba, CAggOrderBgra); + PixelFormatCustomBlendRgba(FPixelFormatCompPre, FRenderingBuffer, @BlendModeAdaptorRgba, CAggOrderBgra); end; end; @@ -745,15 +681,20 @@ constructor TAgg2D.Create(PixelFormat: TAggPixelFormat = pfBGRA); FPathTransform := TAggConvTransform.Create(FConvCurve, FTransform); FStrokeTransform := TAggConvTransform.Create(FConvStroke, FTransform); -{$IFDEF AGG2D_USE_FREETYPE} + {$IFDEF AGG2D_USE_FREETYPE } FFontEngine := TAggFontEngineFreetypeInt32.Create; -{$ELSE} + {$ENDIF } + {$IFDEF AGG2D_USE_WINFONTS} FFontDC := GetDC(0); - FFontEngine := TAggFontEngineWin32TrueTypeInt32.Create(FFontDC); -{$ENDIF} - + {$ENDIF } + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} FFontCacheManager := TAggFontCacheManager.Create(FFontEngine); + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + FFontGlyph := TAggGlyphRasterBin.Create(nil); + FFontFlipY := False; + {$ENDIF} SetLineCap(FLineCap); SetLineJoin(FLineJoin); @@ -766,7 +707,6 @@ constructor TAgg2D.Create(Buffer: PInt8u; Width, Height: Cardinal; Attach(Buffer, Width, Height, Stride); end; - destructor TAgg2D.Destroy; begin FRendererBase.Free; @@ -818,17 +758,21 @@ destructor TAgg2D.Destroy; FConvDash.Free; FConvStroke.Free; - FFontEngine.Free; - FFontCacheManager.Free; - FPixelFormatProc.Free; FPixelFormatComp.Free; FPixelFormatPre.Free; FPixelFormatCompPre.Free; -{$IFNDEF AGG2D_USE_FREETYPE} + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} + FFontEngine.Free; + FFontCacheManager.Free; + {$ENDIF} + {$IFDEF AGG2D_USE_WINFONTS} ReleaseDC(0, FFontDC); -{$ENDIF} + {$ENDIF } + {$IFDEF AGG2D_USE_RASTERFONTS} + FFontGlyph.Free; + {$ENDIF} end; procedure TAgg2D.Attach(Buffer: PInt8u; Width, Height: Cardinal; Stride: Integer); @@ -866,8 +810,7 @@ procedure TAgg2D.Attach(Buffer: PInt8u; Width, Height: Cardinal; Stride: Integer procedure TAgg2D.Attach(Img: TAgg2DImage); begin - Attach(Img.FRenderingBuffer.Buffer, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, Img.FRenderingBuffer.Stride); + Attach(Img.FRenderingBuffer.Buffer, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, Img.FRenderingBuffer.Stride); end; procedure TAgg2D.ClipBox(X1, Y1, X2, Y2: Double); @@ -904,14 +847,26 @@ procedure TAgg2D.ClearAll(R, G, B: Cardinal; A: Cardinal = 255); ClearAll(Clr); end; +procedure TAgg2D.FillAll(C: TAggColorRgba8); +begin + FRendererBase.Fill(C); +end; + +procedure TAgg2D.FillAll(R, G, B: Cardinal; A: Cardinal = 255); +var + Clr: TAggColorRgba8; +begin + Clr.Initialize(R, G, B, A); + FillAll(Clr); +end; + procedure TAgg2D.ClearClipBox(C: TAggColorRgba8); var Clr: TAggColor; begin Clr.FromRgba8(C); - FRendererBase.CopyBar(0, 0, FRendererBase.Width, FRendererBase.Height, - @Clr); + FRendererBase.CopyBar(0, 0, FRendererBase.Width, FRendererBase.Height, @Clr); end; procedure TAgg2D.ClearClipBox(R, G, B: Cardinal; A: Cardinal = 255); @@ -1090,8 +1045,7 @@ procedure TAgg2D.NoLine; SetLineColor(Clr); end; -procedure TAgg2D.FillLinearGradient(X1, Y1, X2, Y2: Double; - C1, C2: TAggColorRgba8; Profile: Double = 1); +procedure TAgg2D.FillLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); var I, StartGradient, StopGradient: Integer; K, Angle: Double; @@ -1148,8 +1102,7 @@ procedure TAgg2D.FillLinearGradient(X1, Y1, X2, Y2: Double; FFillColor.Initialize(0, 0, 0); // Set some real TAggColorRgba8 end; -procedure TAgg2D.LineLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); +procedure TAgg2D.LineLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); var I, StartGradient, StopGradient: Integer; K, Angle: Double; @@ -1204,8 +1157,7 @@ procedure TAgg2D.LineLinearGradient(X1, Y1, X2, Y2: Double; C1, C2: TAggColorRgb FLineGradientFlag := grdLinear; end; -procedure TAgg2D.FillRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); +procedure TAgg2D.FillRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); var I, StartGradient, StopGradient: Integer; @@ -1263,8 +1215,7 @@ procedure TAgg2D.FillRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; FFillColor.Initialize(0, 0, 0); // Set some real TAggColorRgba8 end; -procedure TAgg2D.LineRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; - Profile: Double = 1); +procedure TAgg2D.LineRadialGradient(X, Y, R: Double; C1, C2: TAggColorRgba8; Profile: Double = 1); var I, StartGradient, StopGradient: Integer; K: Double; @@ -1496,9 +1447,7 @@ procedure TAgg2D.Affine(var Tr: TAggTransformations); var Ta: TAggTransAffine; begin - Ta := TAggTransAffine.Create(Tr.AffineMatrix[0], Tr.AffineMatrix[1], - Tr.AffineMatrix[2], Tr.AffineMatrix[3], Tr.AffineMatrix[4], - Tr.AffineMatrix[5]); + Ta := TAggTransAffine.Create(Tr.AffineMatrix[0], Tr.AffineMatrix[1], Tr.AffineMatrix[2], Tr.AffineMatrix[3], Tr.AffineMatrix[4], Tr.AffineMatrix[5]); try Affine(Ta); finally @@ -1548,8 +1497,7 @@ procedure TAgg2D.Parallelogram(X1, Y1, X2, Y2: Double; Para: PDouble); UpdateApproximationScale; end; -procedure TAgg2D.Viewport(WorldX1, WorldY1, WorldX2, WorldY2, ScreenX1, ScreenY1, - ScreenX2, ScreenY2: Double; Opt: TAggViewportOption = voXMidYMid); +procedure TAgg2D.Viewport(WorldX1, WorldY1, WorldX2, WorldY2, ScreenX1, ScreenY1, ScreenX2, ScreenY2: Double; Opt: TAggViewportOption = voXMidYMid); var Vp: TAggTransViewport; Mx: TAggTransAffine; @@ -1661,11 +1609,24 @@ procedure TAgg2D.Viewport(World, Screen: TRectDouble; Opt: TAggViewportOption); UpdateApproximationScale; end; -procedure TAgg2D.Line(X1, Y1, X2, Y2: Double); +procedure TAgg2D.Line(X1, Y1, X2, Y2: Double; AFixAlignment: Boolean); +var + LX1, LY1, LX2, LY2: Double; begin FPath.RemoveAll; - AddLine(X1, Y1, X2, Y2); + LX1 := X1; + LY1 := Y1; + LX2 := X2; + LY2 := Y2; + + if AFixAlignment then + begin + AlignPoint(@LX1, @LY1); + AlignPoint(@LX2, @LY2); + end; + + AddLine(LX1, LY1, LX2, LY2); DrawPath(dpfStrokeOnly); end; @@ -1680,16 +1641,33 @@ procedure TAgg2D.Triangle(X1, Y1, X2, Y2, X3, Y3: Double); DrawPath(dpfFillAndStroke); end; -procedure TAgg2D.Rectangle(X1, Y1, X2, Y2: Double); +procedure TAgg2D.Rectangle(X1, Y1, X2, Y2: Double; AFixAlignment: Boolean); +var + LX1, LY1, LX2, LY2: Double; begin FPath.RemoveAll; - FPath.MoveTo(X1, Y1); - FPath.LineTo(X2, Y1); - FPath.LineTo(X2, Y2); - FPath.LineTo(X1, Y2); + + LX1 := X1; + LY1 := Y1; + LX2 := X2; + LY2 := Y2; + + if AFixAlignment then + begin + AlignPoint(@LX1, @LY1); + AlignPoint(@LX2, @LY2); + end; + + FPath.MoveTo(LX1, LY1); + FPath.LineTo(LX2, LY1); + FPath.LineTo(LX2, LY2); + FPath.LineTo(LX1, LY2); FPath.ClosePolygon; - DrawPath(dpfFillAndStroke); + if FFillColor.A = 0 then + DrawPath(dpfStrokeOnly) + else + DrawPath(dpfFillAndStroke); end; procedure TAgg2D.RemoveAllDashes; @@ -1901,8 +1879,7 @@ procedure TAgg2D.Curve(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Double); DrawPath(dpfStrokeOnly); end; -procedure TAgg2D.Polygon(XY: PPointDouble; NumPoints: Integer; - Flag: TAggDrawPathFlag = dpfFillAndStroke); +procedure TAgg2D.Polygon(XY: PPointDouble; NumPoints: Integer; Flag: TAggDrawPathFlag = dpfFillAndStroke); begin FPath.RemoveAll; FPath.AddPoly(Xy, NumPoints); @@ -1921,12 +1898,20 @@ procedure TAgg2D.Polyline(Xy: PPointDouble; NumPoints: Integer); procedure TAgg2D.SetFlipText(Value: Boolean); begin + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} FFontEngine.FlipY := Value; + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + FFontFlipY := Value; + {$ENDIF} end; function TAgg2D.GetFlipText: Boolean; begin + Result := False; + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} Result := FFontEngine.FlipY; + {$ENDIF} end; function TAgg2D.GetRow(Y: Cardinal): PInt8U; @@ -1934,29 +1919,35 @@ function TAgg2D.GetRow(Y: Cardinal): PInt8U; Result := FRenderingBuffer.Row(Y); end; -procedure TAgg2D.Font(FileName: PAnsiChar; Height: Double; Bold: Boolean = False; - Italic: Boolean = False; Ch: TAggFontCache = fcRaster; - Angle: Double = 0); +procedure TAgg2D.Font(FileName: PAnsiChar; Height: Double; Bold: Boolean = False; Italic: Boolean = False; Ch: TAggFontCache = fcRaster; Angle: Double = 0); +{$IFDEF AGG2D_USE_WINFONTS} var B: Integer; +{$ENDIF} +{$IFDEF AGG2D_USE_RASTERFONTS} +var + I: Integer; + RasterFont : PInt8u; +{$ENDIF} begin FTextAngle := Angle; FFontHeight := Height; FFontCacheType := Ch; -{$IFDEF AGG2D_USE_FREETYPE} + {$IFDEF AGG2D_USE_FREETYPE} + FFontEngine.Hinting := FTextHints; + if Ch = fcVector then FFontEngine.LoadFont(PAnsiChar(FileName), 0, grOutline) else FFontEngine.LoadFont(PAnsiChar(FileName), 0, grAgggray8); - FFontEngine.Hinting := FTextHints; - if Ch = fcVector then FFontEngine.SetHeight(Height) else FFontEngine.SetHeight(WorldToScreen(Height)); -{$ELSE} + {$ENDIF} + {$IFDEF AGG2D_USE_WINFONTS} FFontEngine.Hinting := FTextHints; if Bold then @@ -1965,12 +1956,38 @@ procedure TAgg2D.Font(FileName: PAnsiChar; Height: Double; Bold: Boolean = False B := 400; if Ch = fcVector then - FFontEngine.CreateFont(PAnsiChar(FileName), grOutline, Height, 0, B, - Italic) + FFontEngine.CreateFont(PAnsiChar(FileName), grOutline, Height, 0, B, Italic) else - FFontEngine.CreateFont(PAnsiChar(FileName), grAgggray8, - WorldToScreen(Height), 0, B, Italic); -{$ENDIF} + FFontEngine.CreateFont(PAnsiChar(FileName), grAgggray8, WorldToScreen(Height), 0, B, Italic); + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + RasterFont := nil; + + for i := 0 to Length(Fonts) - 1 do + begin + if StrComp(PAnsiChar(Fonts[i].Name), FileName) = 0 then + begin + RasterFont := Fonts[i].Font; + Break; + end; + end; + if RasterFont = nil then + begin + for i := 0 to Length(Fonts) - 1 do + begin + if StrComp(PAnsiChar(Fonts[i].Name), PAnsiChar(DefaultRasterFontName)) = 0 then + begin + RasterFont := Fonts[i].Font; + Break; + end; + end; + end; + if RasterFont = nil then + begin + RasterFont := Fonts[0].Font; + end; + FFontGlyph.SetFont(RasterFont); + {$ENDIF} end; function TAgg2D.FontHeight: Double; @@ -1988,6 +2005,9 @@ procedure TAgg2D.TextAlignment(AlignX: TAggTextAlignmentHorizontal; procedure TAgg2D.SetTextHints(Value: Boolean); begin FTextHints := Value; + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} + FFontEngine.Hinting := FTextHints; + {$ENDIF} end; function TAgg2D.TextWidth(Str: PAnsiChar): Double; @@ -1996,6 +2016,11 @@ function TAgg2D.TextWidth(Str: PAnsiChar): Double; First: Boolean; Glyph: PAggGlyphCache; begin + Result := 0; + + if (StrLen(Str) <= 0) then Exit; + + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} X := 0; Y := 0; @@ -2023,6 +2048,10 @@ function TAgg2D.TextWidth(Str: PAnsiChar): Double; Result := X else Result := ScreenToWorld(X); + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + Result := FFontGlyph.Width(Str); + {$ENDIF} end; function TAgg2D.TextWidth(Str: AnsiString): Double; @@ -2032,6 +2061,11 @@ function TAgg2D.TextWidth(Str: AnsiString): Double; Glyph: PAggGlyphCache; I: Integer; begin + Result := 0; + + if Str = '' then Exit; + + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} X := 0; Y := 0; @@ -2057,18 +2091,30 @@ function TAgg2D.TextWidth(Str: AnsiString): Double; Result := X else Result := ScreenToWorld(X); + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + Result := FFontGlyph.Width(PAnsiChar(Str)); + {$ENDIF} end; -procedure TAgg2D.Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; - Ddx: Double = 0; Ddy: Double = 0); +procedure TAgg2D.Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; Ddx: Double = 0; Ddy: Double = 0); var Asc: Double; Delta, Start: TPointDouble; Glyph: PAggGlyphCache; Mtx: TAggTransAffine; - I: Integer; Tr: TAggConvTransform; + CharLen: Integer; + CharId: LongWord; + First: Boolean; + {$IFDEF AGG2D_USE_RASTERFONTS} + Rt: TAggRendererRasterHorizontalTextSolid; + {$ENDIF} begin + + if (StrLen(Str) <= 0) then Exit; + + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} Delta.X := 0; Delta.Y := 0; @@ -2122,17 +2168,20 @@ procedure TAgg2D.Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; if FFontCacheType = fcRaster then WorldToScreen(@Start.X, @Start.Y); - I := 0; + First:=true; - while PAnsiChar(PtrComp(Str) + I * SizeOf(AnsiChar))^ <> #0 do + while Str^ <> #0 do begin - Glyph := FFontCacheManager.Glyph - (Int32u(PAnsiChar(PtrComp(Str) + I * SizeOf(AnsiChar))^)); - - if Glyph <> nil then + CharId := UTF8CharToUnicode(Str, CharLen); + inc(Str, CharLen); + Glyph := FFontCacheManager.Glyph(CharId); + if Glyph <> NIL then begin - if I <> 0 then + if First then + begin FFontCacheManager.AddKerning(@X, @Y); + First:= False; + end; FFontCacheManager.InitEmbeddedAdaptors(Glyph, Start.X, Start.Y); @@ -2140,37 +2189,90 @@ procedure TAgg2D.Text(X, Y: Double; Str: PAnsiChar; RoundOff: Boolean = False; begin FPath.RemoveAll; FPath.AddPath(Tr, 0, False); - DrawPath; end; if Glyph.DataType = gdGray8 then begin - Render(FFontCacheManager.Gray8Adaptor, - FFontCacheManager.Gray8ScanLine); + Render(FFontCacheManager.Gray8Adaptor, FFontCacheManager.Gray8ScanLine); end; Start.X := Start.X + Glyph.AdvanceX; Start.Y := Start.Y + Glyph.AdvanceY; end; - Inc(I); end; finally Tr.Free; Mtx.Free end; + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + Delta.X := 0; + Delta.Y := 0; + + case FTextAlignX of + tahCenter: + Delta.X := -TextWidth(Str) * 0.5; + tahRight: + Delta.X := -TextWidth(Str); + end; + + Asc := FontHeight; + + case FTextAlignY of + tavCenter: + Delta.Y := -Asc * 0.5; + tavTop: + Delta.Y := -Asc; + end; + + if FFontFlipY then + Delta.Y := -Delta.Y; + + Start.X := X + Delta.X; + Start.Y := Y + Delta.Y; + + if RoundOff then + begin + Start.X := Trunc(Start.X); + Start.Y := Trunc(Start.Y); + end; + + Start.X := Start.X + Ddx; + Start.Y := Start.Y + Ddy; + + Rt := TAggRendererRasterHorizontalTextSolid.Create(FRendererBase, FFontGlyph); + + try + if (FFontGlyph.GetFont() = nil) then + Font(PChar(DefaultRasterFontName),14); + + Rt.SetColor(FFillColor); + Rt.RenderText(Start.X, Start.Y, Str, FFontFlipY); + finally + Rt.Free; + end; + {$ENDIF} end; -procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, - Ddy: Double); +procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, Ddy: Double); var Asc: Double; Delta, Start: TPointDouble; Glyph: PAggGlyphCache; Mtx: TAggTransAffine; - I: Integer; Tr: TAggConvTransform; + PStr : PChar; + CharLen: Integer; + CharId: LongWord; + First: Boolean; + {$IFDEF AGG2D_USE_RASTERFONTS} + Rt: TAggRendererRasterHorizontalTextSolid; + {$ENDIF} begin + if Str = '' then Exit; + + {$IF DEFINED(AGG2D_USE_FREETYPE) OR DEFINED(AGG2D_USE_WINFONTS)} Delta.X := 0; Delta.Y := 0; @@ -2193,7 +2295,6 @@ procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, case FTextAlignY of tavCenter: Delta.Y := -Asc * 0.5; - tavTop: Delta.Y := -Asc; end; @@ -2224,14 +2325,21 @@ procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, if FFontCacheType = fcRaster then WorldToScreen(@Start.X, @Start.Y); - for I := 1 to Length(Str) do - begin - Glyph := FFontCacheManager.Glyph(Int32u(Str[I])); + Pstr:=@Str[1 ]; + First:= True; - if Glyph <> nil then + while PStr^ <> #0 do + begin + CharId := UTF8CharToUnicode(PStr, CharLen); + inc(PStr, CharLen); + Glyph := FFontCacheManager.Glyph(CharId); + if Glyph <> NIL then begin - if I <> 0 then - FFontCacheManager.AddKerning(@X, @Y); + if First then + begin + FFontCacheManager.AddKerning(@X ,@Y ); + First:= False; + end; FFontCacheManager.InitEmbeddedAdaptors(Glyph, Start.X, Start.Y); @@ -2239,7 +2347,6 @@ procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, begin FPath.RemoveAll; FPath.AddPath(Tr, 0, False); - DrawPath; end; @@ -2257,6 +2364,54 @@ procedure TAgg2D.Text(X, Y: Double; Str: AnsiString; RoundOff: Boolean; Ddx, Tr.Free; Mtx.Free end; + {$ENDIF} + {$IFDEF AGG2D_USE_RASTERFONTS} + Delta.X := 0; + Delta.Y := 0; + + case FTextAlignX of + tahCenter: + Delta.X := -TextWidth(Str) * 0.5; + tahRight: + Delta.X := -TextWidth(Str); + end; + + Asc := FontHeight; + + case FTextAlignY of + tavCenter: + Delta.Y := -Asc * 0.5; + tavTop: + Delta.Y := -Asc; + end; + + if FFontFlipY then + Delta.Y := -Delta.Y; + + Start.X := X + Delta.X; + Start.Y := Y + Delta.Y; + + if RoundOff then + begin + Start.X := Trunc(Start.X); + Start.Y := Trunc(Start.Y); + end; + + Start.X := Start.X + Ddx; + Start.Y := Start.Y + Ddy; + + Rt := TAggRendererRasterHorizontalTextSolid.Create(FRendererBase, FFontGlyph); + + try + if (FFontGlyph.GetFont() = nil) then + Font(PChar(DefaultRasterFontName),14); + + Rt.SetColor(FFillColor); + Rt.RenderText(Start.X, Start.Y, PAnsiChar(Str), FFontFlipY); + finally + Rt.Free; + end; + {$ENDIF} end; procedure TAgg2D.ResetPath; @@ -2304,14 +2459,12 @@ procedure TAgg2D.VerticalLineRel(Dy: Double); FPath.VerticalLineRelative(Dy); end; -procedure TAgg2D.ArcTo(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; - X, Y: Double); +procedure TAgg2D.ArcTo(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; X, Y: Double); begin FPath.ArcTo(Rx, Ry, Angle, LargeArcFlag, SweepFlag, X, Y); end; -procedure TAgg2D.ArcRel(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; - Dx, Dy: Double); +procedure TAgg2D.ArcRel(Rx, Ry, Angle: Double; LargeArcFlag, SweepFlag: Boolean; Dx, Dy: Double); begin FPath.ArcRelative(Rx, Ry, Angle, LargeArcFlag, SweepFlag, Dx, Dy); end; @@ -2341,8 +2494,7 @@ procedure TAgg2D.CubicCurveTo(XCtrl1, YCtrl1, XCtrl2, YCtrl2, XTo, YTo: Double); FPath.Curve4(XCtrl1, YCtrl1, XCtrl2, YCtrl2, XTo, YTo); end; -procedure TAgg2D.CubicCurveRel(DxCtrl1, DyCtrl1, DxCtrl2, DyCtrl2, DxTo, - DyTo: Double); +procedure TAgg2D.CubicCurveRel(DxCtrl1, DyCtrl1, DxCtrl2, DyCtrl2, DxTo, DyTo: Double); begin FPath.Curve4Relative(DxCtrl1, DyCtrl1, DxCtrl2, DyCtrl2, DxTo, DyTo); end; @@ -2493,8 +2645,7 @@ procedure TAgg2D.SetImageResample(F: TAggImageResample); FImageResample := F; end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, - ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); var Parall: TAggParallelogram; begin @@ -2515,8 +2666,7 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, RenderImage(Img, ImgX1, ImgY1, ImgX2, ImgY2, @Parall[0]); end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; - DstX1, DstY1, DstX2, DstY2: Double); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; DstX1, DstY1, DstX2, DstY2: Double); var Parall: TAggParallelogram; begin @@ -2534,8 +2684,7 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; Parall[4] := DstX2; Parall[5] := DstY2; - RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, @Parall[0]); + RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, @Parall[0]); end; procedure TAgg2D.TransformImage(Img: TAgg2DImage; Destination: TRectDouble); @@ -2556,56 +2705,31 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; Destination: TRectDouble); Parall[4] := Destination.X2; Parall[5] := Destination.Y2; - RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, @Parall[0]); + RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, @Parall[0]); end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; - Parallelogram: PDouble); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); begin ResetPath; - MoveTo(PDouble(PtrComp(Parallelogram))^, - PDouble(PtrComp(Parallelogram) + SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram))^ + - PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + MoveTo(PDouble(PtrComp(Parallelogram))^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram))^ + PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); ClosePolygon; RenderImage(Img, ImgX1, ImgY1, ImgX2, ImgY2, Parallelogram); end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Parallelogram: PDouble); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; Parallelogram: PDouble); begin ResetPath; - MoveTo(PDouble(PtrComp(Parallelogram))^, - PDouble(PtrComp(Parallelogram) + SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram))^ + - PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + MoveTo(PDouble(PtrComp(Parallelogram))^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram))^ + PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); ClosePolygon; @@ -2616,30 +2740,17 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; Parallelogram: PDouble); begin ResetPath; - MoveTo(PDouble(Parallelogram)^, PDouble(PtrComp(Parallelogram) + - SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); - - LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); - - LineTo(PDouble(Parallelogram)^ + - PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, - PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + - PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + MoveTo(PDouble(Parallelogram)^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); + LineTo(PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^); + LineTo(PDouble(Parallelogram)^ + PDouble(PtrComp(Parallelogram) + 4 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 2 * SizeOf(Double))^, PDouble(PtrComp(Parallelogram) + SizeOf(Double))^ + PDouble(PtrComp(Parallelogram) + 5 * SizeOf(Double))^ - PDouble(PtrComp(Parallelogram) + 3 * SizeOf(Double))^); ClosePolygon; - RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, Parallelogram); + RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, Parallelogram); end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; DstX1, - DstY1, DstX2, DstY2: Double); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; DstX1, DstY1, DstX2, DstY2: Double); var Parall: TAggParallelogram; begin @@ -2653,8 +2764,7 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; DstX1, RenderImage(Img, ImgRect, @Parall[0]); end; -procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Destination: TRectDouble); +procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; Destination: TRectDouble); var Parall: TAggParallelogram; begin @@ -2668,8 +2778,7 @@ procedure TAgg2D.TransformImage(Img: TAgg2DImage; ImgRect: TRectInteger; RenderImage(Img, ImgRect, @Parall[0]); end; -procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; - ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); +procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX1, DstY1, DstX2, DstY2: Double); var Parall: TAggParallelogram; begin @@ -2683,8 +2792,7 @@ procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; RenderImage(Img, ImgX1, ImgY1, ImgX2, ImgY2, @Parall[0]); end; -procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; - DstX1, DstY1, DstX2, DstY2: Double); +procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; DstX1, DstY1, DstX2, DstY2: Double); var Parall: TAggParallelogram; begin @@ -2695,24 +2803,20 @@ procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; Parall[4] := DstX2; Parall[5] := DstY2; - RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, @Parall[0]); + RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, @Parall[0]); end; -procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; - ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); +procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; Parallelogram: PDouble); begin RenderImage(Img, ImgX1, ImgY1, ImgX2, ImgY2, Parallelogram); end; procedure TAgg2D.TransformImagePath(Img: TAgg2DImage; Parallelogram: PDouble); begin - RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, - Img.FRenderingBuffer.Height, Parallelogram); + RenderImage(Img, 0, 0, Img.FRenderingBuffer.Width, Img.FRenderingBuffer.Height, Parallelogram); end; -procedure TAgg2D.BlendImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; - DstX, DstY: Double; Alpha: Cardinal = 255); +procedure TAgg2D.BlendImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX, DstY: Double; Alpha: Cardinal = 255); var PixF: TAggPixelFormatProcessor; R: TRectInteger; @@ -2722,15 +2826,12 @@ procedure TAgg2D.BlendImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Intege R := RectInteger(ImgX1, ImgY1, ImgX2, ImgY2); if FBlendMode = bmAlpha then - FRendererBasePre.BlendFrom(PixF, @R, Trunc(DstX) - ImgX1, - Trunc(DstY) - ImgY1, Alpha) + FRendererBasePre.BlendFrom(PixF, @R, Trunc(DstX) - ImgX1, Trunc(DstY) - ImgY1, Alpha) else - FRendererBaseCompPre.BlendFrom(PixF, @R, Trunc(DstX) - ImgX1, - Trunc(DstY) - ImgY1, Alpha); + FRendererBaseCompPre.BlendFrom(PixF, @R, Trunc(DstX) - ImgX1, Trunc(DstY) - ImgY1, Alpha); end; -procedure TAgg2D.BlendImage(Img: TAgg2DImage; DstX, DstY: Double; - Alpha: Cardinal = 255); +procedure TAgg2D.BlendImage(Img: TAgg2DImage; DstX, DstY: Double; Alpha: Cardinal = 255); var PixF: TAggPixelFormatProcessor; begin @@ -2745,25 +2846,21 @@ procedure TAgg2D.BlendImage(Img: TAgg2DImage; DstX, DstY: Double; FRendererBaseCompPre.BlendFrom(PixF, nil, Trunc(DstX), Trunc(DstY), Alpha); end; -procedure TAgg2D.CopyImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; - DstX, DstY: Double); +procedure TAgg2D.CopyImage(Img: TAgg2DImage; ImgX1, ImgY1, ImgX2, ImgY2: Integer; DstX, DstY: Double); var R: TRectInteger; begin WorldToScreen(@DstX, @DstY); R := RectInteger(ImgX1, ImgY1, ImgX2, ImgY2); - FRendererBase.CopyFrom(Img.FRenderingBuffer, @R, Trunc(DstX) - ImgX1, - Trunc(DstY) - ImgY1); + FRendererBase.CopyFrom(Img.FRenderingBuffer, @R, Trunc(DstX) - ImgX1, Trunc(DstY) - ImgY1); end; -procedure TAgg2D.CopyImage(Img: TAgg2DImage; ImgRect: TRectInteger; - Destination: TPointDouble); +procedure TAgg2D.CopyImage(Img: TAgg2DImage; ImgRect: TRectInteger; Destination: TPointDouble); begin WorldToScreen(@Destination.X, @Destination.Y); - FRendererBase.CopyFrom(Img.FRenderingBuffer, @ImgRect, - Trunc(Destination.X) - ImgRect.X1, Trunc(Destination.Y) - ImgRect.Y1); + FRendererBase.CopyFrom(Img.FRenderingBuffer, @ImgRect, Trunc(Destination.X) - ImgRect.X1, Trunc(Destination.Y) - ImgRect.Y1); end; procedure TAgg2D.CopyImage(Img: TAgg2DImage; DstX, DstY: Double); @@ -2777,8 +2874,15 @@ procedure TAgg2D.CopyImage(Img: TAgg2DImage; Destination: TPointDouble); begin WorldToScreen(@Destination.X, @Destination.Y); - FRendererBase.CopyFrom(Img.FRenderingBuffer, nil, Trunc(Destination.X), - Trunc(Destination.Y)); + FRendererBase.CopyFrom(Img.FRenderingBuffer, nil, Trunc(Destination.X), Trunc(Destination.Y)); +end; + +procedure TAgg2D.Blur(RX, RY: Cardinal); +begin + if ((FPixelFormat = pfRGBA) or (FPixelFormat = pfBGRA)) then + begin + StackBlurRgba32(@FPixelFormatProc, RX, RY); + end; end; procedure TAgg2D.Render(AFillColor: Boolean); @@ -2818,8 +2922,7 @@ procedure TAgg2D.UpdateRasterizerGamma; FRasterizer.Gamma(FGammaAgg2D); end; -procedure TAgg2D.RenderImage(Img: TAgg2DImage; X1, Y1, X2, Y2: Integer; - Parl: PDouble); +procedure TAgg2D.RenderImage(Img: TAgg2DImage; X1, Y1, X2, Y2: Integer; Parl: PDouble); var Mtx: TAggTransAffine; Interpolator: TAggSpanInterpolatorLinear; @@ -2846,8 +2949,7 @@ procedure TAgg2D.RenderImage(Img: TAgg2DImage; X1, Y1, X2, Y2: Integer; end; end; -procedure TAgg2D.RenderImage(Img: TAgg2DImage; Rect: TRectInteger; - Parl: PDouble); +procedure TAgg2D.RenderImage(Img: TAgg2DImage; Rect: TRectInteger; Parl: PDouble); var Mtx: TAggTransAffine; Interpolator: TAggSpanInterpolatorLinear; @@ -2875,11 +2977,9 @@ procedure TAgg2D.RenderImage(Img: TAgg2DImage; Rect: TRectInteger; end; end; - { TAggSpanConvImageBlend } -constructor TAggSpanConvImageBlend.Create(BlendMode: TAggBlendMode; C: TAggColorRgba8; - P: TAggPixelFormatProcessor); +constructor TAggSpanConvImageBlend.Create(BlendMode: TAggBlendMode; C: TAggColorRgba8; P: TAggPixelFormatProcessor); begin FMode := BlendMode; FColor := C; @@ -2898,8 +2998,7 @@ procedure TAggSpanConvImageBlend.Convert(Span: PAggColor; X, Y: Integer; S2 := PAggColorRgba8(Span); repeat - BlendModeAdaptorClipToDestinationRgbaPre(FPixel, FMode, - PInt8u(S2), FColor.R, FColor.G, FColor.B, CAggBaseMask, CAggCoverFull); + BlendModeAdaptorClipToDestinationRgbaPre(FPixel, FMode, PInt8u(S2), FColor.R, FColor.G, FColor.B, CAggBaseMask, CAggCoverFull); Inc(PtrComp(S2), SizeOf(TAggColorRgba8)); Dec(L2); @@ -2934,8 +3033,7 @@ function OperatorIsNotEqual(C1, C2: PAggColorRgba8): Boolean; Result := not OperatorIsEqual(C1, C2); end; -procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; - RenSolid: TAggRendererScanLineAASolid; FillColor: Boolean); +procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; RenSolid: TAggRendererScanLineAASolid; FillColor: Boolean); var Span: TAggSpanGradient; Ren : TAggRendererScanLineAA; @@ -2945,9 +3043,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; (not FillColor and (Gr.FLineGradientFlag = grdLinear)) then if FillColor then begin - Span := TAggSpanGradient.Create(Gr.FAllocator, - Gr.FFillGradientInterpolator, Gr.FLinearGradientFunction, - Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, Gr.FLinearGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -2961,9 +3057,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; end else begin - Span := TAggSpanGradient.Create(Gr.FAllocator, - Gr.FLineGradientInterpolator, Gr.FLinearGradientFunction, - Gr.FLineGradient, Gr.FLineGradientD1, Gr.FLineGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FLineGradientInterpolator, Gr.FLinearGradientFunction, Gr.FLineGradient, Gr.FLineGradientD1, Gr.FLineGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -2975,13 +3069,10 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; Span.Free; end; end - else if (FillColor and (Gr.FFillGradientFlag = grdRadial)) or - (not FillColor and (Gr.FLineGradientFlag = grdRadial)) then + else if (FillColor and (Gr.FFillGradientFlag = grdRadial)) or (not FillColor and (Gr.FLineGradientFlag = grdRadial)) then if FillColor then begin - Span := TAggSpanGradient.Create(Gr.FAllocator, - Gr.FFillGradientInterpolator, Gr.FRadialGradientFunction, - Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, Gr.FRadialGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -2995,9 +3086,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; end else begin - Span := TAggSpanGradient.Create(Gr.FAllocator, - Gr.FLineGradientInterpolator, Gr.FRadialGradientFunction, - Gr.FLineGradient, Gr.FLineGradientD1, Gr.FLineGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FLineGradientInterpolator, Gr.FRadialGradientFunction, Gr.FLineGradient, Gr.FLineGradientD1, Gr.FLineGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -3021,9 +3110,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; end; end; -procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; - RenSolid: TAggRendererScanLineAASolid; Ras: TAggGray8Adaptor; - Sl: TAggGray8ScanLine); +procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; RenSolid: TAggRendererScanLineAASolid; Ras: TAggGray8Adaptor; Sl: TAggGray8ScanLine); var Span: TAggSpanGradient; Ren : TAggRendererScanLineAA; @@ -3031,9 +3118,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; begin if Gr.FFillGradientFlag = grdLinear then begin - Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, - Gr.FLinearGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, - Gr.FFillGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, Gr.FLinearGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -3047,9 +3132,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; end else if Gr.FFillGradientFlag = grdRadial then begin - Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, - Gr.FRadialGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, - Gr.FFillGradientD2); + Span := TAggSpanGradient.Create(Gr.FAllocator, Gr.FFillGradientInterpolator, Gr.FRadialGradientFunction, Gr.FFillGradient, Gr.FFillGradientD1, Gr.FFillGradientD2); try Ren := TAggRendererScanLineAA.Create(RendererBase, Span); try @@ -3069,8 +3152,7 @@ procedure Agg2DRendererRender(Gr: TAgg2D; RendererBase: TAggRendererBase; end; end; -procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; - RendererBase: TAggRendererBase; Interpolator: TAggSpanInterpolatorLinear); +procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; RendererBase: TAggRendererBase; Interpolator: TAggSpanInterpolatorLinear); var Blend: TAggSpanConvImageBlend; @@ -3085,19 +3167,16 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; Resample: Boolean; Sx, Sy: Double; begin - Blend := TAggSpanConvImageBlend.Create(Gr.FImageBlendMode, - Gr.FImageBlendColor, Gr.FPixelFormatCompPre); + Blend := TAggSpanConvImageBlend.Create(Gr.FImageBlendMode, Gr.FImageBlendColor, Gr.FPixelFormatCompPre); try if Gr.FImageFilter = ifNoFilter then begin Clr.Clear; case Gr.FPixelFormat of pfRGBA: - Sg := TAggSpanImageFilterRgbaNN.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderRgba); + Sg := TAggSpanImageFilterRgbaNN.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderRgba); pfBGRA: - Sg := TAggSpanImageFilterRgbaNN.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderBgra); + Sg := TAggSpanImageFilterRgbaNN.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderBgra); end; try Sc := TAggSpanConverter.Create(Sg, Blend); @@ -3132,13 +3211,9 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; Clr.Clear; case Gr.FPixelFormat of pfRGBA: - Sa := TAggSpanImageResampleRgbaAffine.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderRgba); + Sa := TAggSpanImageResampleRgbaAffine.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderRgba); pfBGRA: - Sa := TAggSpanImageResampleRgbaAffine.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderBgra); + Sa := TAggSpanImageResampleRgbaAffine.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderBgra); end; try Sc := TAggSpanConverter.Create(Sa, Blend); @@ -3161,11 +3236,9 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; Clr.Clear; case GR.FPixelFormat of pfRGBA: - Sb := TAggSpanImageFilterRgbaBilinear.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderRgba); + Sb := TAggSpanImageFilterRgbaBilinear.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderRgba); pfBGRA: - Sb := TAggSpanImageFilterRgbaBilinear.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderBgra); + Sb := TAggSpanImageFilterRgbaBilinear.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, CAggOrderBgra); end; try Sc := TAggSpanConverter.Create(Sb, Blend); @@ -3188,13 +3261,9 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; Clr.Clear; case GR.FPixelFormat of pfRGBA: - S2 := TAggSpanImageFilterRgba2x2.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderRgba); + S2 := TAggSpanImageFilterRgba2x2.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderRgba); pfBGRA: - S2 := TAggSpanImageFilterRgba2x2.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderBgra); + S2 := TAggSpanImageFilterRgba2x2.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderBgra); end; try Sc := TAggSpanConverter.Create(S2, Blend); @@ -3217,13 +3286,9 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; Clr.Clear; case GR.FPixelFormat of pfRGBA: - Si := TAggSpanImageFilterRgba.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderRgba); + Si := TAggSpanImageFilterRgba.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderRgba); pfBGRA: - Si := TAggSpanImageFilterRgba.Create(Gr.FAllocator, - Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, - CAggOrderBgra); + Si := TAggSpanImageFilterRgba.Create(Gr.FAllocator, Img.FRenderingBuffer, @Clr, Interpolator, Gr.FImageFilterLUT, CAggOrderBgra); end; try Sc := TAggSpanConverter.Create(Si, Blend); @@ -3249,11 +3314,29 @@ procedure Agg2DRendererRenderImage(Gr: TAgg2D; Img: TAgg2DImage; function Agg2DUsesFreeType: Boolean; begin -{$IFDEF AGG2D_USE_FREETYPE} + {$IFDEF AGG2D_USE_FREETYPE} Result := True; -{$ELSE} + {$ELSE} Result := False; -{$ENDIF} + {$ENDIF} +end; + +function Agg2DUsesWin32TrueType: Boolean; +begin + {$IFDEF AGG2D_USE_WINFONTS} + Result := True; + {$ELSE} + Result := False; + {$ENDIF} +end; + +function Agg2DUsesRasterType: Boolean; +begin + {$IFDEF AGG2D_USE_RASTERFONTS} + Result := True; + {$ELSE} + Result := False; + {$ENDIF} end; end. diff --git a/Source/Agg2DGraphics.pas b/Source/Agg2DGraphics.pas index 3bb6796..4893070 100644 --- a/Source/Agg2DGraphics.pas +++ b/Source/Agg2DGraphics.pas @@ -44,8 +44,7 @@ implementation procedure TAgg2DGraphics.Attach(Bitmap: TBitmap); begin Bitmap.PixelFormat := TPixelFormat.pf32bit; - Attach(Bitmap.ScanLine[Bitmap.Height - 1], Bitmap.Width, Bitmap.Height, - -Bitmap.Width * 4); + Attach(Bitmap.ScanLine[Bitmap.Height - 1], Bitmap.Width, Bitmap.Height, -Bitmap.Width * 4); end; end. diff --git a/Source/AggAlphaMaskUnpacked8.pas b/Source/AggAlphaMaskUnpacked8.pas old mode 100644 new mode 100755 diff --git a/Source/AggArc.pas b/Source/AggArc.pas old mode 100644 new mode 100755 index f9ad825..48daf32 --- a/Source/AggArc.pas +++ b/Source/AggArc.pas @@ -39,26 +39,20 @@ TAggArc = class(TAggCustomVertexSource) FX, FY, FAngle, FStart, FEnd, FScale, FDeltaAngle: Double; FCounterClockWise, FInitialized: Boolean; FPathCmd: Cardinal; - procedure SetApproximationScale(Value: Double); protected procedure Normalize(A1, A2: Double; Ccw: Boolean); public constructor Create; overload; - constructor Create(X, Y, Rx, Ry, A1, A2: Double; - Ccw: Boolean = True); overload; - + constructor Create(X, Y, Rx, Ry, A1, A2: Double; Ccw: Boolean = True); overload; procedure Init(X, Y, Rx, Ry, A1, A2: Double; Ccw: Boolean = True); - procedure Rewind(PathID: Cardinal); override; function Vertex(X, Y: PDouble): Cardinal; override; - property ApproximationScale: Double read FScale write SetApproximationScale; end; implementation - { TAggArc } constructor TAggArc.Create; @@ -71,12 +65,9 @@ constructor TAggArc.Create; FStart := 0; FEnd := 0; FDeltaAngle := 0; - FCounterClockWise := False; FPathCmd := 0; - FScale := 1; - FInitialized := False; end; @@ -126,11 +117,11 @@ function TAggArc.Vertex(X, Y: PDouble): Cardinal; if IsStop(FPathCmd) then Result := CAggPathCmdStop - else if (FAngle < FEnd - FDeltaAngle / 4) <> FCounterClockWise then + else if (FAngle < (FEnd - (FDeltaAngle / 4))) <> FCounterClockWise then begin SinCos(FEnd, Pnt.Y, Pnt.X); - X^ := FX + Pnt.X * FRadius.X; - Y^ := FY + Pnt.Y * FRadius.Y; + X^ := FX + (Pnt.X * FRadius.X); + Y^ := FY + (Pnt.Y * FRadius.Y); FPathCmd := CAggPathCmdStop; @@ -139,8 +130,8 @@ function TAggArc.Vertex(X, Y: PDouble): Cardinal; else begin SinCos(FAngle, Pnt.Y, Pnt.X); - X^ := FX + Pnt.X * FRadius.X; - Y^ := FY + Pnt.Y * FRadius.Y; + X^ := FX + (Pnt.X * FRadius.X); + Y^ := FY + (Pnt.Y * FRadius.Y); FAngle := FAngle + FDeltaAngle; @@ -156,7 +147,7 @@ procedure TAggArc.Normalize(A1, A2: Double; Ccw: Boolean); Ra: Double; begin Ra := (Abs(FRadius.X) + Abs(FRadius.Y)) * 0.5; - FDeltaAngle := ArcCos(Ra / (Ra + 0.125 / FScale)) * 2; + FDeltaAngle := ArcCos(Ra / (Ra + (0.125 / FScale))) * 2; if Ccw then while A2 < A1 do diff --git a/Source/AggArray.pas b/Source/AggArray.pas old mode 100644 new mode 100755 diff --git a/Source/AggArrowHead.pas b/Source/AggArrowHead.pas old mode 100644 new mode 100755 diff --git a/Source/AggBSpline.pas b/Source/AggBSpline.pas old mode 100644 new mode 100755 diff --git a/Source/AggBasics.pas b/Source/AggBasics.pas old mode 100644 new mode 100755 index 63769c6..9952e7e --- a/Source/AggBasics.pas +++ b/Source/AggBasics.pas @@ -421,6 +421,11 @@ function ShrInt32(I, Shift: Integer): Integer; procedure Fill32Bit(var X; Count: Cardinal; var Value); +function UTF8CharToUnicode(p: PChar; out CharLen: longint): cardinal; {$IFDEF PUREPASCAL} {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF} {$ENDIF} +function IntHex(I: Int64; Max: Byte = 0; Do_Low: Boolean = False): string; {$IFDEF PUREPASCAL} {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF} {$ENDIF} +function BackLen(STW: string; Sz: Byte): string; {$IFDEF PUREPASCAL} {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF} {$ENDIF} +function MakeStr(Ch: Char; Sz: Byte): string; {$IFDEF PUREPASCAL} {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF} {$ENDIF} + implementation function AggGetMem(out Buf: Pointer; Sz: Cardinal): Boolean; @@ -966,13 +971,6 @@ procedure SwapPointers(A, B: Pointer); PPointer(B)^ := Temp; end; -// bve -{function MakeStr(Ch: AnsiChar; Sz: Byte): ShortString; -begin - Result[0] := AnsiChar(Sz); - - FillChar(Result[1], Sz, Ch); -end;} function MakeStr(Ch: Char; Sz: Byte): string; begin Result := ''; @@ -980,50 +978,6 @@ function MakeStr(Ch: Char; Sz: Byte): string; Result := Result + Ch; end; -// bve -{function BackLen(STW: ShortString; Sz: Byte): ShortString; -type - TSCAN = (SCAN_0, SCAN_1, SCAN_2, SCAN_3, SCAN_4, SCAN_5, SCAN_6, SCAN_7, - SCAN_8, SCAN_9, SCAN_A, SCAN_B, SCAN_C, SCAN_D, SCAN_E, SCAN_F, SCAN_G, - SCAN_H, SCAN_I, SCAN_J, SCAN_K, SCAN_L, SCAN_M, SCAN_N, SCAN_O, SCAN_P, - SCAN_Q, SCAN_R, SCAN_S, SCAN_T, SCAN_U, SCAN_V, SCAN_W, SCAN_X, SCAN_Y, - SCAN_Z); - -var - Pos, Wcb: Byte; - Scn : TSCAN; -begin - Result := ''; - - Wcb := Sz; - Pos := Length(STW); - Scn := SCAN_1; - - while Wcb > 0 do - begin - case Scn of - SCAN_1: - if Pos > 0 then - begin - Result := STW[Pos] + Result; - - Dec(Pos); - - end - else - begin - Scn := SCAN_2; - - Result := ' ' + Result; - end; - - SCAN_2: - Result := ' ' + Result; - end; - - Dec(Wcb); - end; -end;} function BackLen(STW: string; Sz: Byte): string; type TSCAN = (SCAN_0, SCAN_1, SCAN_2, SCAN_3, SCAN_4, SCAN_5, SCAN_6, SCAN_7, @@ -1068,65 +1022,6 @@ function BackLen(STW: string; Sz: Byte): string; end; end; -// bve -{function IntHex(I: Int64; Max: Byte = 0; Do_Low: Boolean = False): ShortString; -var - Str: ShortString; - Itm: Boolean; - Fcb: Byte; -const - CLow: array [0..$F] of AnsiChar = '0123456789abcdef'; - CHex: array [0..$F] of AnsiChar = '0123456789ABCDEF'; -begin - if Do_Low then - Str := CLow[I shr 60 and 15] + CLow[I shr 56 and 15] + CLow[I shr 52 and 15] + - CLow[I shr 48 and 15] + CLow[I shr 44 and 15] + CLow[I shr 40 and 15] + - CLow[I shr 36 and 15] + CLow[I shr 32 and 15] + - - CLow[I shr 28 and 15] + CLow[I shr 24 and 15] + CLow[I shr 20 and 15] + - CLow[I shr 16 and 15] + CLow[I shr 12 and 15] + CLow[I shr 8 and 15] + - CLow[I shr 4 and 15] + CLow[I and 15] - else - Str := CHex[I shr 60 and 15] + CHex[I shr 56 and 15] + CHex[I shr 52 and 15] + - CHex[I shr 48 and 15] + CHex[I shr 44 and 15] + CHex[I shr 40 and 15] + - CHex[I shr 36 and 15] + CHex[I shr 32 and 15] + - - CHex[I shr 28 and 15] + CHex[I shr 24 and 15] + CHex[I shr 20 and 15] + - CHex[I shr 16 and 15] + CHex[I shr 12 and 15] + CHex[I shr 8 and 15] + - CHex[I shr 4 and 15] + CHex[I and 15]; - - if Max > 0 then - if Length(Str) > Max then - Result := BackLen(Str, Max) - else if Length(Str) < Max then - Result := MakeStr('0', Max - Length(Str)) + Str - else - Result := Str - - else - begin - Result := ''; - - Itm := False; - - for Fcb := 1 to Length(Str) do - if Itm then - Result := Result + Str[Fcb] - else - case Str[Fcb] of - '0': - else - begin - Result := Str[Fcb]; - - Itm := True; - end; - end; - - if Result = '' then - Result := '0'; - end; -end;} function IntHex(I: Int64; Max: Byte = 0; Do_Low: Boolean = False): string; var Str: string; @@ -1186,6 +1081,59 @@ function IntHex(I: Int64; Max: Byte = 0; Do_Low: Boolean = False): string; end; end; +function UTF8CharToUnicode(p: PChar; out CharLen: LongInt): Cardinal; +begin + if p = nil then + begin + Result := 0; + CharLen := 0; + exit; + end; + if Ord(p^) < $C0 then + begin + // regular single byte character (#0 is a normal char, this is pascal ;) + end + else if ((Ord(p^) and $E0) = $C0) then + begin + // could be double byte character + if (Ord(p[1]) and $C0) = $80 then + begin + Result := ((Ord(p^) and $1F) shl 6) or (Ord(p[1]) and $3F); + CharLen := 2; + exit; + end; + end + else if ((Ord(p^) and $F0) = $E0) then + begin + // could be triple byte character + if ((Ord(p[1]) and $C0) = $80) and ((Ord(p[2]) and $C0) = $80) then + begin + Result := ((Ord(p^) and $1F) shl 12) or ((Ord(p[1]) and $3F) shl 6) or + (Ord(p[2]) and $3F); + CharLen := 3; + exit; + end; + end + else if ((Ord(p^) and $F8) = $F0) then + begin + // could be 4 byte character + if ((Ord(p[1]) and $C0) = $80) and ((Ord(p[2]) and $C0) = $80) and + ((Ord(p[3]) and $C0) = $80) then + begin + Result := ((Ord(p^) and $0F) shl 18) or ((Ord(p[1]) and $3F) shl 12) or + ((Ord(p[2]) and $3F) shl 6) or (Ord(p[3]) and $3F); + CharLen := 4; + exit; + end; + end + else + begin + // invalid character + end; + Result := Ord(p^); + CharLen := 1; +end; + function IntToDouble(I: Integer): Double; begin Result := I; @@ -1408,7 +1356,7 @@ function ShrInt32(I, Shift: Integer): Integer; end; procedure Fill32Bit(var X; Count: Cardinal; var Value); -{$IFDEF PUREPASCAL} +{$IF DEFINED(PUREPASCAL) OR DEFINED(AGG_CPU_PPC) OR (DEFINED(AGG_CPU_64) AND DEFINED(AGG_LINUX))} var I: Integer; P: PIntegerArray; @@ -1440,9 +1388,6 @@ procedure Fill32Bit(var X; Count: Cardinal; var Value); @Exit: POP RDI {$ENDIF} -{$IFDEF AGG_CPU_PPC} - yet undefined, please use PUREPASCAL implementation -{$ENDIF} {$ENDIF} end; diff --git a/Source/AggBezierArc.pas b/Source/AggBezierArc.pas old mode 100644 new mode 100755 diff --git a/Source/AggBitsetIterator.pas b/Source/AggBitsetIterator.pas old mode 100644 new mode 100755 diff --git a/Source/AggBlur.pas b/Source/AggBlur.pas old mode 100644 new mode 100755 diff --git a/Source/AggBoundingRect.pas b/Source/AggBoundingRect.pas old mode 100644 new mode 100755 index dcab40a..6d948bb --- a/Source/AggBoundingRect.pas +++ b/Source/AggBoundingRect.pas @@ -4,7 +4,7 @@ // // // Anti-Grain Geometry (modernized Pascal fork, aka 'AggPasMod') // // Maintained by Christian-W. Budde (Christian@pcjv.de) // -// Copyright (c) 2012-2017a // +// Copyright (c) 2012-2020 // // // // Based on: // // Pascal port by Milan Marusinec alias Milano (milan@marusinec.sk) // diff --git a/Source/AggClipLiangBarsky.pas b/Source/AggClipLiangBarsky.pas old mode 100644 new mode 100755 diff --git a/Source/AggColor.pas b/Source/AggColor.pas old mode 100644 new mode 100755 diff --git a/Source/AggColorConversion.pas b/Source/AggColorConversion.pas old mode 100644 new mode 100755 diff --git a/Source/AggCompiler.inc b/Source/AggCompiler.inc old mode 100644 new mode 100755 index 2c4f6f0..33e1d76 --- a/Source/AggCompiler.inc +++ b/Source/AggCompiler.inc @@ -44,7 +44,7 @@ {$DEFINE AGG_WINDOWS} {$ENDIF} -{$IFDEF LINUX} +{$IF DEFINED(UNIX) AND NOT DEFINED(DARWIN)} {$DEFINE AGG_LINUX} {$ENDIF} diff --git a/Source/AggConvAdaptorVcgen.pas b/Source/AggConvAdaptorVcgen.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvAdaptorVpgen.pas b/Source/AggConvAdaptorVpgen.pas old mode 100644 new mode 100755 index 4054375..12992ab --- a/Source/AggConvAdaptorVpgen.pas +++ b/Source/AggConvAdaptorVpgen.pas @@ -29,8 +29,8 @@ interface uses AggBasics, AggVertexSource, - AggVpgen, - AggVpgenSegmentator; + AggVpGen, + AggVpGenSegmentator; type TAggConvAdaptorVpgen = class(TAggVertexSource) diff --git a/Source/AggConvBSpline.pas b/Source/AggConvBSpline.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvClipPolygon.pas b/Source/AggConvClipPolygon.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvClipPolyline.pas b/Source/AggConvClipPolyline.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvConcat.pas b/Source/AggConvConcat.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvContour.pas b/Source/AggConvContour.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvCurve.pas b/Source/AggConvCurve.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvDash.pas b/Source/AggConvDash.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvGpc.pas b/Source/AggConvGPC.pas old mode 100644 new mode 100755 similarity index 95% rename from Source/AggConvGpc.pas rename to Source/AggConvGPC.pas index 3e87fd4..2bc4a80 --- a/Source/AggConvGpc.pas +++ b/Source/AggConvGPC.pas @@ -35,7 +35,7 @@ interface {$I AggCompiler.inc} uses - Gpc, + GPC, AggBasics, AggArray, AggVertexSource; diff --git a/Source/AggConvMarker.pas b/Source/AggConvMarker.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvMarkerAdaptor.pas b/Source/AggConvMarkerAdaptor.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvSegmentator.pas b/Source/AggConvSegmentator.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvShortenPath.pas b/Source/AggConvShortenPath.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvSmoothPoly.pas b/Source/AggConvSmoothPoly.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvStroke.pas b/Source/AggConvStroke.pas old mode 100644 new mode 100755 diff --git a/Source/AggConvTransform.pas b/Source/AggConvTransform.pas old mode 100644 new mode 100755 diff --git a/Source/AggCurves.pas b/Source/AggCurves.pas old mode 100644 new mode 100755 diff --git a/Source/AggDdaLine.pas b/Source/AggDdaLine.pas old mode 100644 new mode 100755 diff --git a/Source/AggEllipse.pas b/Source/AggEllipse.pas old mode 100644 new mode 100755 diff --git a/Source/AggEllipseBresenham.pas b/Source/AggEllipseBresenham.pas old mode 100644 new mode 100755 diff --git a/Source/AggEmbeddedRasterFonts.pas b/Source/AggEmbeddedRasterFonts.pas old mode 100644 new mode 100755 diff --git a/Source/AggFontCacheManager.pas b/Source/AggFontCacheManager.pas old mode 100644 new mode 100755 index 56d7368..434c294 --- a/Source/AggFontCacheManager.pas +++ b/Source/AggFontCacheManager.pas @@ -155,9 +155,7 @@ destructor TAggFontCache.Destroy; function TAggFontCache.FontIs(FontSignature: TAggBytes): Boolean; begin - Result := (Length(FFontSignature) = Length(FontSignature)) - and (CompareMem(@FontSignature[0], @FFontSignature[0], Length(FontSignature))); - + Result := (Length(FFontSignature) = Length(FontSignature)) and (CompareMem(@FontSignature[0], @FFontSignature[0], Length(FontSignature))); inherited; end; @@ -168,8 +166,7 @@ function TAggFontCache.FindGlyph(GlyphCode: Cardinal): PAggGlyphCache; Msb := (GlyphCode shr 8) and $FF; if FGlyphs[Msb] <> nil then - Result := PPAggGlyphCache(PtrComp(FGlyphs[Msb]) + (GlyphCode and $FF) - * SizeOf(PAggGlyphCache))^ + Result := PPAggGlyphCache(PtrComp(FGlyphs[Msb]) + (GlyphCode and $FF) * SizeOf(PAggGlyphCache))^ else Result := nil; end; diff --git a/Source/AggFontEngine.pas b/Source/AggFontEngine.pas old mode 100644 new mode 100755 diff --git a/Source/AggFontFreetype.pas b/Source/AggFontFreeType.pas old mode 100644 new mode 100755 similarity index 93% rename from Source/AggFontFreetype.pas rename to Source/AggFontFreeType.pas index 67504a9..ff9ce8f --- a/Source/AggFontFreetype.pas +++ b/Source/AggFontFreeType.pas @@ -1,1523 +1,1503 @@ -unit AggFontFreeType; - -//////////////////////////////////////////////////////////////////////////////// -// // -// Anti-Grain Geometry (modernized Pascal fork, aka 'AggPasMod') // -// Maintained by Christian-W. Budde (Christian@pcjv.de) // -// Copyright (c) 2012-2020 // -// // -// Based on: // -// Pascal port by Milan Marusinec alias Milano (milan@marusinec.sk) // -// Copyright (c) 2005-2006, see http://www.aggpas.org // -// // -// Original License: // -// Anti-Grain Geometry - Version 2.4 (Public License) // -// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // -// Contact: McSeem@antigrain.com / McSeemAgg@yahoo.com // -// // -// Permission to copy, use, modify, sell and distribute this software // -// is granted provided this copyright notice appears in all copies. // -// This software is provided "as is" without express or implied // -// warranty, and with no claim as to its suitability for any purpose. // -// // -//////////////////////////////////////////////////////////////////////////////// -// B.Verhue 1-11-2016 // -// // -// - Replaced AnsiString with byte array and AnsiChar with byte // -// - Used TEncodig class to convert from string to bytes and vice versa // -// - Relpaced pointer lists with dynamic arrays // -// // -//////////////////////////////////////////////////////////////////////////////// - -interface - -{$I AggCompiler.inc} - -uses - SysUtils, - Math, - AggFontFreeTypeLib, - AggBasics, - AggFontEngine, - AggFontCacheManager, - AggTransAffine, - AggVertexSource, - AggPathStorageInteger, - AggConvCurve, - AggScanLine, - AggScanlineUnpacked, - AggScanLineBin, - AggRasterizerScanLineAA, - AggRendererScanLine, - AggRenderScanLines, - AggBitsetIterator; - -type - TAggFontEngineFreetypeBase = class(TAggCustomFontEngine) - private - FFlag32: Boolean; - - FChangeStamp, FLastError: Integer; - - FFaceName: TAggBytes; - FFaceIndex: Cardinal; - FCharMap: TAggFreeTypeEncoding; - FSignature: TAggBytes; - - FHeight, FWidth: Cardinal; - - FHinting, FFlipY, FLibraryInitialized: Boolean; - - FLibrary: PAggFreeTypeLibrary; // handle to library - - FFaces: array of PAggFreeTypeFace; // A pool of font faces - FFaceNames: array of TAggBytes; - FNumFaces, FMaxFaces: Cardinal; - FCurFace: PAggFreeTypeFace; // handle to the current face object - - FResolution: Integer; - - FGlyphRendering: TAggGlyphRendering; - FGlyphIndex, FDataSize: Cardinal; - FDataType: TAggGlyphData; - - FBounds: TRectInteger; - FAdvanceX, FAdvanceY: Double; - FAffine: TAggTransAffine; - - FPath16: TAggPathStorageInt16; - FPath32: TAggPathStorageInt32; - FCurves16, FCurves32: TAggConvCurve; - - FScanLineAA: TAggScanLineUnpacked8; - FScanLineBin: TAggScanLineBin; - FScanLinesAA: TAggScanLinesAA; - FScanLinesBin: TAggScanLinesBin; - FRasterizer: TAggRasterizerScanLineAA; - - // private - procedure UpdateCharSize; - procedure UpdateSignature; - - function FindFace(Name: TAggBytes): Integer; - - procedure SetHinting(Value: Boolean); - procedure SetFlipY(Flip: Boolean); - protected - function GetGlyphIndex: Cardinal; override; - function GetDataSize: Cardinal; override; - function GetDataType: TAggGlyphData; override; - function GetAdvanceX: Double; override; - function GetAdvanceY: Double; override; - function GetAscender: Double; override; - function GetDescender: Double; override; - function GetDefaultLineSpacing: Double; override; - function GetFlag32: Boolean; override; - public - constructor Create(AFlag32: Boolean; MaxFaces: Cardinal = 32); - destructor Destroy; override; - - // Set font parameters - procedure SetResolution(Dpi: Cardinal); - - // Get some name info to enable font selection - function GetNameInfo(Face: PAggFreeTypeFace; var FontFamily, FontSubFamily, - UniqueFontID, FullFontName: string): boolean; overload; - function GetNameInfo(FontName: string; var FontFamily, FontSubFamily, - UniqueFontID, FullFontName: string): boolean; overload; - - function LoadFont(FontName: string; FaceIndex: Cardinal; - RenType: TAggGlyphRendering; FontMem: PAggFreeTypeByte = nil; - FontMemSize: Integer = 0): Boolean; - - function Attach(FileName: string): Boolean; - - function SetCharMap(Map: TAggFreeTypeEncoding): Boolean; - function SetHeight(Value: Double): Boolean; - function SetWidth(Value: Double): Boolean; - procedure SetTransform(Affine: TAggTransAffine); - - // Set Gamma - procedure SetGamma(F: TAggCustomVertexSource); - - // Accessors - function GetLastError: Integer; - function GetResolution: Cardinal; - function GetName: string; - function GetNum_faces: Cardinal; - function GetCharMap: TAggFreeTypeEncoding; - function GetHeight: Double; - function GetWidth: Double; - - // Interface mandatory to implement for TAggFontCacheManager - function GetFontSignature: TAggBytes; override; - function GetBounds: PRectInteger; override; - function ChangeStamp: Integer; override; - - function PrepareGlyph(GlyphCode: Cardinal): Boolean; override; - - procedure WriteGlyphTo(Data: PInt8u); override; - function AddKerning(First, Second: Cardinal; X, Y: PDouble): Boolean; - override; - - property FlipY: Boolean read FFlipY write SetFlipY; - property Hinting: Boolean read FHinting write SetHinting; - property Height: Double read GetHeight; - end; - - // ------------------------------------------------FontEngineFreetypeInt16 - // This class uses values of type int16 (10.6 format) for the vector cache. - // The vector cache is compact, but when rendering glyphs of height - // more that 200 there integer overfLow can occur. - TAggFontEngineFreetypeInt16 = class(TAggFontEngineFreetypeBase) - public - constructor Create(MaxFaces: Cardinal = 32); - end; - - // ------------------------------------------------FontEngineFreetypeInt32 - // This class uses values of type int32 (26.6 format) for the vector cache. - // The vector cache is twice larger than in FontEngineFreetypeInt16, - // but it allows you to render glyphs of very large sizes. - TAggFontEngineFreetypeInt32 = class(TAggFontEngineFreetypeBase) - public - constructor Create(MaxFaces: Cardinal = 32); - end; - -implementation - - -// ------------------------------------------------------------------------------ -// -// This code implements the AUTODIN II polynomial -// The variable corresponding to the macro argument "crc" should -// be an Cardinal long. -// Oroginal code by Spencer Garrett <srg@quick.com> -// -// generated using the AUTODIN II polynomial -// x^32 + x^26 + x^23 + x^22 + x^16 + -// x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + 1 -// -// ------------------------------------------------------------------------------ -const - Crc32tab: array [0..255] of Cardinal = ($00000000, $77073096, $EE0E612C, - $990951BA, $076DC419, $706AF48F, $E963A535, $9E6495A3, $0EDB8832, $79DCB8A4, - $E0D5E91E, $97D2D988, $09B64C2B, $7EB17CBD, $E7B82D07, $90BF1D91, $1DB71064, - $6AB020F2, $F3B97148, $84BE41DE, $1ADAD47D, $6DDDE4EB, $F4D4B551, $83D385C7, - $136C9856, $646BA8C0, $FD62F97A, $8A65C9EC, $14015C4F, $63066CD9, $FA0F3D63, - $8D080DF5, $3B6E20C8, $4C69105E, $D56041E4, $A2677172, $3C03E4D1, $4B04D447, - $D20D85FD, $A50AB56B, $35B5A8FA, $42B2986C, $DBBBC9D6, $ACBCF940, $32D86CE3, - $45DF5C75, $DCD60DCF, $ABD13D59, $26D930AC, $51DE003A, $C8D75180, $BFD06116, - $21B4F4B5, $56B3C423, $CFBA9599, $B8BDA50F, $2802B89E, $5F058808, $C60CD9B2, - $B10BE924, $2F6F7C87, $58684C11, $C1611DAB, $B6662D3D, $76DC4190, $01DB7106, - $98D220BC, $EFD5102A, $71B18589, $06B6B51F, $9FBFE4A5, $E8B8D433, $7807C9A2, - $0F00F934, $9609A88E, $E10E9818, $7F6A0DBB, $086D3D2D, $91646C97, $E6635C01, - $6B6B51F4, $1C6C6162, $856530D8, $F262004E, $6C0695ED, $1B01A57B, $8208F4C1, - $F50FC457, $65B0D9C6, $12B7E950, $8BBEB8EA, $FCB9887C, $62DD1DDF, $15DA2D49, - $8CD37CF3, $FBD44C65, $4DB26158, $3AB551CE, $A3BC0074, $D4BB30E2, $4ADFA541, - $3DD895D7, $A4D1C46D, $D3D6F4FB, $4369E96A, $346ED9FC, $AD678846, $DA60B8D0, - $44042D73, $33031DE5, $AA0A4C5F, $DD0D7CC9, $5005713C, $270241AA, $BE0B1010, - $C90C2086, $5768B525, $206F85B3, $B966D409, $CE61E49F, $5EDEF90E, $29D9C998, - $B0D09822, $C7D7A8B4, $59B33D17, $2EB40D81, $B7BD5C3B, $C0BA6CAD, $EDB88320, - $9ABFB3B6, $03B6E20C, $74B1D29A, $EAD54739, $9DD277AF, $04DB2615, $73DC1683, - $E3630B12, $94643B84, $0D6D6A3E, $7A6A5AA8, $E40ECF0B, $9309FF9D, $0A00AE27, - $7D079EB1, $F00F9344, $8708A3D2, $1E01F268, $6906C2FE, $F762575D, $806567CB, - $196C3671, $6E6B06E7, $FED41B76, $89D32BE0, $10DA7A5A, $67DD4ACC, $F9B9DF6F, - $8EBEEFF9, $17B7BE43, $60B08ED5, $D6D6A3E8, $A1D1937E, $38D8C2C4, $4FDFF252, - $D1BB67F1, $A6BC5767, $3FB506DD, $48B2364B, $D80D2BDA, $AF0A1B4C, $36034AF6, - $41047A60, $DF60EFC3, $A867DF55, $316E8EEF, $4669BE79, $CB61B38C, $BC66831A, - $256FD2A0, $5268E236, $CC0C7795, $BB0B4703, $220216B9, $5505262F, $C5BA3BBE, - $B2BD0B28, $2BB45A92, $5CB36A04, $C2D7FFA7, $B5D0CF31, $2CD99E8B, $5BDEAE1D, - $9B64C2B0, $EC63F226, $756AA39C, $026D930A, $9C0906A9, $EB0E363F, $72076785, - $05005713, $95BF4A82, $E2B87A14, $7BB12BAE, $0CB61B38, $92D28E9B, $E5D5BE0D, - $7CDCEFB7, $0BDBDF21, $86D3D2D4, $F1D4E242, $68DDB3F8, $1FDA836E, $81BE16CD, - $F6B9265B, $6FB077E1, $18B74777, $88085AE6, $FF0F6A70, $66063BCA, $11010B5C, - $8F659EFF, $F862AE69, $616BFFD3, $166CCF45, $A00AE278, $D70DD2EE, $4E048354, - $3903B3C2, $A7672661, $D06016F7, $4969474D, $3E6E77DB, $AED16A4A, $D9D65ADC, - $40DF0B66, $37D83BF0, $A9BCAE53, $DEBB9EC5, $47B2CF7F, $30B5FFE9, $BDBDF21C, - $CABAC28A, $53B39330, $24B4A3A6, $BAD03605, $CDD70693, $54DE5729, $23D967BF, - $B3667A2E, $C4614AB8, $5D681B02, $2A6F2B94, $B40BBE37, $C30C8EA1, $5A05DF1B, - $2D02EF8D); - - -function Calc_crc32(Buf: PInt8u; Size: Cardinal): Cardinal; -var - Crc, Len, Nr: Cardinal; - - P: PInt8u; - -begin - Crc := Cardinal(not 0); - Len := 0; - Nr := Size; - Len := Len + Nr; - P := Buf; - - while Nr <> 0 do - begin - Dec(Nr); - - Crc := (Crc shr 8) xor Crc32tab[(Crc xor P^) and $FF]; - - Inc(PtrComp(P), SizeOf(Int8u)); - end; - - Result := not Crc; -end; - -function DoubleToPlainFixedPoint(D: Double): Integer; -begin - Result := Trunc(D * 65536.0) -end; - -function Int26p6ToDouble(P: Integer): Double; -begin - Result := P / 64.0; -end; - -function DoubleToInt26p6(P: Double): Integer; -begin - Result := Trunc(P * 64.0 + 0.5); -end; - -function DecomposeFreeTypeOutline(Outline: PAggFreeTypeOutline; FlipY: Boolean; - Mtx: TAggTransAffine; Path: TAggCustomPathStorageInteger): Boolean; -var - V_last, V_control, V_start, Vec, V_middle, Vec1, Vec2: TAggFreeTypeVector; - - X1, Y1, X2, Y2, X3, Y3: Double; - - Point, Limit: PAggFreeTypeVector; - - Tags: PAggFreeTypeByte; - - N, // index of contour in outline - First, // index of first point in contour - Last: Integer; // index of last point in contour - - Tag: TAggFreeTypeByte; // current point's state - -label - Do_Conic, Close; - -begin - First := 0; - N := 0; - - while N < Outline.NumContours do - begin - Last := PAggFreeTypeShort(PtrComp(Outline.Contours) + N * SizeOf(TAggFreeTypeShort))^; - Limit := PAggFreeTypeVector(PtrComp(Outline.Points) + Last * SizeOf(TAggFreeTypeVector)); - - V_start := PAggFreeTypeVector(PtrComp(Outline.Points) + First * - SizeOf(TAggFreeTypeVector))^; - V_last := PAggFreeTypeVector(PtrComp(Outline.Points) + Last * - SizeOf(TAggFreeTypeVector))^; - - V_control := V_start; - - Point := PAggFreeTypeVector(PtrComp(Outline.Points) + First * SizeOf(TAggFreeTypeVector)); - Tags := PAggFreeTypeByte(PtrComp(Outline.Tags) + First * SizeOf(TAggFreeTypeByte)); - Tag := FreeTypeCurveTag(Tags^); - - // A contour cannot start with a cubic control point! - if Tag = CAggFreeTypeCurveTagCubic then - begin - Result := False; - Exit; - end; - - // check first point to determine origin - if Tag = CAggFreeTypeCurveTagConic then - begin - // first point is conic control. Yes, this happens. - if FreeTypeCurveTag(PAggFreeTypeByte(PtrComp(Outline.Tags) + Last)^) - = CAggFreeTypeCurveTagOn then - begin - // start at last point if it is on the curve - V_start := V_last; - - Dec(Limit); - - end - else - begin - // if both first and last points are conic, - // start at their middle and record its position - // for closure - V_start.X := (V_start.X + V_last.X) div 2; - V_start.Y := (V_start.Y + V_last.Y) div 2; - - V_last := V_start; - end; - - Dec(PtrComp(Point), SizeOf(TAggFreeTypeVector)); - Dec(PtrComp(Tags)); - end; - - X1 := Int26p6ToDouble(V_start.X); - Y1 := Int26p6ToDouble(V_start.Y); - - if FlipY then - Y1 := -Y1; - - Mtx.Transform(Mtx, @X1, @Y1); - Path.MoveTo(DoubleToInt26p6(X1), DoubleToInt26p6(Y1)); - - while PtrComp(Point) < PtrComp(Limit) do - begin - Inc(PtrComp(Point), SizeOf(TAggFreeTypeVector)); - Inc(PtrComp(Tags)); - - Tag := FreeTypeCurveTag(Tags^); - - case Tag of - // emit a single LineTo - CAggFreeTypeCurveTagOn: - begin - X1 := Int26p6ToDouble(Point.X); - Y1 := Int26p6ToDouble(Point.Y); - - if FlipY then - Y1 := -Y1; - - Mtx.Transform(Mtx, @X1, @Y1); - Path.LineTo(DoubleToInt26p6(X1), DoubleToInt26p6(Y1)); - - Continue; - end; - - // consume conic arcs - CAggFreeTypeCurveTagConic: - begin - V_control.X := Point.X; - V_control.Y := Point.Y; - - Do_Conic: - if PtrComp(Point) < PtrComp(Limit) then - begin - Inc(PtrComp(Point), SizeOf(TAggFreeTypeVector)); - Inc(PtrComp(Tags)); - - Tag := FreeTypeCurveTag(Tags^); - - Vec.X := Point.X; - Vec.Y := Point.Y; - - if Tag = CAggFreeTypeCurveTagOn then - begin - X1 := Int26p6ToDouble(V_control.X); - Y1 := Int26p6ToDouble(V_control.Y); - X2 := Int26p6ToDouble(Vec.X); - Y2 := Int26p6ToDouble(Vec.Y); - - if FlipY then - begin - Y1 := -Y1; - Y2 := -Y2; - end; - - Mtx.Transform(Mtx, @X1, @Y1); - Mtx.Transform(Mtx, @X2, @Y2); - - Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), - DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); - - Continue; - end; - - if Tag <> CAggFreeTypeCurveTagConic then - begin - Result := False; - - Exit; - end; - - V_middle.X := (V_control.X + Vec.X) div 2; - V_middle.Y := (V_control.Y + Vec.Y) div 2; - - X1 := Int26p6ToDouble(V_control.X); - Y1 := Int26p6ToDouble(V_control.Y); - X2 := Int26p6ToDouble(V_middle.X); - Y2 := Int26p6ToDouble(V_middle.Y); - - if FlipY then - begin - Y1 := -Y1; - Y2 := -Y2; - end; - - Mtx.Transform(Mtx, @X1, @Y1); - Mtx.Transform(Mtx, @X2, @Y2); - - Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), - DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); - - V_control := Vec; - - goto Do_Conic; - end; - - X1 := Int26p6ToDouble(V_control.X); - Y1 := Int26p6ToDouble(V_control.Y); - X2 := Int26p6ToDouble(V_start.X); - Y2 := Int26p6ToDouble(V_start.Y); - - if FlipY then - begin - Y1 := -Y1; - Y2 := -Y2; - end; - - Mtx.Transform(Mtx, @X1, @Y1); - Mtx.Transform(Mtx, @X2, @Y2); - - Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), - DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); - - goto Close; - end; - - // TAggFreeTypeCurveTag_CUBIC - else - begin - if (PtrComp(Point) + SizeOf(TAggFreeTypeVector) > PtrComp(Limit)) or - (FreeTypeCurveTag(PAggFreeTypeByte(PtrComp(Tags) + 1)^) <> CAggFreeTypeCurveTagCubic) then - begin - Result := False; - - Exit; - end; - - Vec1.X := Point.X; - Vec1.Y := Point.Y; - Vec2.X := PAggFreeTypeVector(PtrComp(Point) + SizeOf(TAggFreeTypeVector)).X; - Vec2.Y := PAggFreeTypeVector(PtrComp(Point) + SizeOf(TAggFreeTypeVector)).Y; - - Inc(PtrComp(Point), 2 * SizeOf(TAggFreeTypeVector)); - Inc(PtrComp(Tags), 2); - - if PtrComp(Point) <= PtrComp(Limit) then - begin - Vec.X := Point.X; - Vec.Y := Point.Y; - - X1 := Int26p6ToDouble(Vec1.X); - Y1 := Int26p6ToDouble(Vec1.Y); - X2 := Int26p6ToDouble(Vec2.X); - Y2 := Int26p6ToDouble(Vec2.Y); - X3 := Int26p6ToDouble(Vec.X); - Y3 := Int26p6ToDouble(Vec.Y); - - if FlipY then - begin - Y1 := -Y1; - Y2 := -Y2; - Y3 := -Y3; - end; - - Mtx.Transform(Mtx, @X1, @Y1); - Mtx.Transform(Mtx, @X2, @Y2); - Mtx.Transform(Mtx, @X3, @Y3); - - Path.Curve4To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), - DoubleToInt26p6(X2), DoubleToInt26p6(Y2), DoubleToInt26p6(X3), - DoubleToInt26p6(Y3)); - - Continue; - end; - - X1 := Int26p6ToDouble(Vec1.X); - Y1 := Int26p6ToDouble(Vec1.Y); - X2 := Int26p6ToDouble(Vec2.X); - Y2 := Int26p6ToDouble(Vec2.Y); - X3 := Int26p6ToDouble(V_start.X); - Y3 := Int26p6ToDouble(V_start.Y); - - if FlipY then - begin - Y1 := -Y1; - Y2 := -Y2; - Y3 := -Y3; - end; - - Mtx.Transform(Mtx, @X1, @Y1); - Mtx.Transform(Mtx, @X2, @Y2); - Mtx.Transform(Mtx, @X3, @Y3); - - Path.Curve4To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), - DoubleToInt26p6(X2), DoubleToInt26p6(Y2), DoubleToInt26p6(X3), - DoubleToInt26p6(Y3)); - - goto Close; - end; - end; - end; - - Path.ClosePolygon; - - Close: - First := Last + 1; - - Inc(N); - end; - - Result := True; -end; - -procedure DecomposeFreeTypeBitmapMono(Bitmap: PAggFreeTypeBitmap; X, Y: Integer; - FlipY: Boolean; Sl: TAggCustomScanLine; Storage: TAggCustomRendererScanLine); -var - I, Pitch, J: Integer; - - Buf : PInt8u; - Bits: TAggBitsetIterator; - -begin - Buf := PInt8u(Bitmap.Buffer); - Pitch := Bitmap.Pitch; - - Sl.Reset(X, X + Bitmap.Width); - Storage.Prepare(Bitmap.Width + 2); - - if FlipY then - begin - Inc(PtrComp(Buf), Bitmap.Pitch * (Bitmap.Rows - 1)); - Inc(Y, Bitmap.Rows); - - Pitch := -Pitch; - end; - - I := 0; - - while I < Bitmap.Rows do - begin - Sl.ResetSpans; - - J := 0; - - Bits := TAggBitsetIterator.Create(Buf, 0); - try - while J < Bitmap.Width do - begin - if Bits.Bit <> 0 then - Sl.AddCell(X + J, CAggCoverFull); - - Bits.IncOperator; - - Inc(J); - end; - finally - Bits.Free; - end; - - Inc(PtrComp(Buf), Pitch * SizeOf(Int8u)); - - if Sl.NumSpans <> 0 then - begin - Sl.Finalize(Y - I - 1); - Storage.Render(Sl); - end; - - Inc(I); - end; -end; - -procedure DecomposeFreeTypeBitmapGray8(Bitmap: PAggFreeTypeBitmap; X, Y: Integer; - FlipY: Boolean; Ras: TAggRasterizerScanLineAA; Sl: TAggCustomScanLine; - Storage: TAggCustomRendererScanLine); -var - I, J, Pitch: Integer; - - Buf, P: PInt8u; - -begin - Buf := PInt8u(Bitmap.Buffer); - Pitch := Bitmap.Pitch; - - Sl.Reset(X, X + Bitmap.Width); - Storage.Prepare(Bitmap.Width + 2); - - if FlipY then - begin - Inc(PtrComp(Buf), Bitmap.Pitch * (Bitmap.Rows - 1)); - Inc(Y, Bitmap.Rows); - - Pitch := -Pitch; - end; - - I := 0; - - while I < Bitmap.Rows do - begin - Sl.ResetSpans; - - P := Buf; - J := 0; - - while J < Bitmap.Width do - begin - if P^ <> 0 then - Sl.AddCell(X + J, Ras.ApplyGamma(P^)); - - Inc(PtrComp(P), SizeOf(Int8u)); - Inc(J); - end; - - Inc(PtrComp(Buf), Pitch * SizeOf(Int8u)); - - if Sl.NumSpans <> 0 then - begin - Sl.Finalize(Y - I - 1); - Storage.Render(Sl); - end; - - Inc(I); - end; -end; - -{ TAggFontEngineFreetypeBase } - -constructor TAggFontEngineFreetypeBase.Create(AFlag32: Boolean; - MaxFaces: Cardinal = 32); -begin - FFlag32 := AFlag32; - - FChangeStamp := 0; - FLastError := 0; - - FFaceIndex := 0; - - FCharMap := CAggFreeTypeEncodingNone; - SetLength(FFaceName, 0); - - SetLength(FSignature, 0); - - FHeight := 0; - FWidth := 0; - FHinting := True; - FFlipY := False; - - FLibraryInitialized := False; - - FLibrary := nil; - - SetLength(FFaces, 0); - SetLength(FFaceNames, 0); - - FNumFaces := 0; - FMaxFaces := MaxFaces; - FCurFace := nil; - FResolution := 0; - - FGlyphRendering := grNativeGray8; - FGlyphIndex := 0; - FDataSize := 0; - FDataType := gdInvalid; - - FBounds := RectInteger(1, 1, 0, 0); - - FAdvanceX := 0.0; - FAdvanceY := 0.0; - - FAffine := TAggTransAffine.Create; - - FPath16 := TAggPathStorageInt16.Create; - FPath32 := TAggPathStorageInt32.Create; - FCurves16 := TAggConvCurve.Create(FPath16); - FCurves32 := TAggConvCurve.Create(FPath32); - FScanLineAA := TAggScanLineUnpacked8.Create; - FScanLineBin := TAggScanLineBin.Create; - FScanLinesAA := TAggScanLinesAA.Create; - FScanLinesBin := TAggScanLinesBin.Create; - FRasterizer := TAggRasterizerScanLineAA.Create; - - FCurves16.ApproximationScale := 4.0; - FCurves32.ApproximationScale := 4.0; - - FLastError := FreeTypeInit(@FLibrary); - - if FLastError = 0 then - FLibraryInitialized := True; -end; - -destructor TAggFontEngineFreetypeBase.Destroy; -var - I: Cardinal; -begin - I := 0; - - while I < Length(FFaces) do - begin - FreeTypeDoneFace(FFaces[I]); - - Inc(I); - end; - - Finalize(FFaceNames); - Finalize(FFaces); - - if FLibraryInitialized then - FreeTypeDone(FLibrary); - - FAffine.Free; - FPath16.Free; - FPath32.Free; - FCurves16.Free; - FCurves32.Free; - FScanLineAA.Free; - FScanLineBin.Free; - - FScanLinesAA.Free; - FScanLinesBin.Free; - FRasterizer.Free; - - inherited; -end; - -procedure TAggFontEngineFreetypeBase.SetResolution(Dpi: Cardinal); -begin - FResolution := Dpi; - - UpdateCharSize; -end; - -function TAggFontEngineFreetypeBase.GetNameInfo(Face: PAggFreeTypeFace; - var FontFamily, FontSubFamily, UniqueFontID, FullFontName: string): boolean; -var - NameCount: TAggFreeTypeUInt; - SfntName: TAggFreeTypeSfntName; - - function ConvertFontName: string; - var - i: integer; - NameBuffer: TAggBytes; - begin - Result := ''; - SetLength(NameBuffer, SfntName.StrLen); - for i := 0 to SFntName.StrLen - 1 do - NameBuffer[i] := PByteArray(SfntName.Str)^[i]; - - // TODO check more encoding combinations - case SfntName.PlatformID of - 0: case SfntName.EncodingID of - 3: Result := TEncoding.BigEndianUnicode.GetString(NameBuffer); - end; - 1: case SfntName.EncodingID of - 0: Result := TEncoding.ANSI.GetString(NameBuffer); - end; - 3: case SfntName.EncodingID of - 1: Result := TEncoding.BigEndianUnicode.GetString(NameBuffer); - end; - end; - end; - -begin - // See http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-chapter08#3054f18b - - Result := False; - - NameCount := FreeTypeGetSfntNameCount(Face); - if NameCount < 5 then - exit; - - Result := True; - - if FreeTypeGetSfntName(Face, 1, SfntName) = 0 then - FontFamily := ConvertFontName; - - if FreeTypeGetSfntName(Face, 2, SfntName) = 0 then - FontSubFamily := ConvertFontName; - - if FreeTypeGetSfntName(Face, 3, SfntName) = 0 then - UniqueFontID := ConvertFontName; - - if FreeTypeGetSfntName(Face, 4, SfntName) = 0 then - FullFontName := ConvertFontName; -end; - -function TAggFontEngineFreetypeBase.GetNameInfo(FontName: string; - var FontFamily, FontSubFamily, UniqueFontID, FullFontName: string): boolean; -var - Face: PAggFreeTypeFace; - NameBuffer: TAggBytes; -begin - Result := False; - NameBuffer := TEncoding.UTF8.GetBytes(FontName + #0); - if FreeTypeNewFace(FLibrary, @NameBuffer[0], 0, Face) = 0 then - try - Result := GetNameInfo(Face, FontFamily, FontSubFamily, UniqueFontID, FullFontName); - finally - FreeTypeDoneFace(Face); - end; -end; - -function TAggFontEngineFreetypeBase.LoadFont(FontName: string; - FaceIndex: Cardinal; RenType: TAggGlyphRendering; FontMem: PAggFreeTypeByte = nil; - FontMemSize: Integer = 0): Boolean; -var - Idx: Integer; -begin - Result := False; - - if FontName = '' then - exit; - - FFaceName := TEncoding.UTF8.GetBytes(FontName + #0); - - if FLibraryInitialized then - begin - FLastError := 0; - - Idx := FindFace(FFaceName); - - if Idx >= 0 then - begin - FCurFace := FFaces[Idx]; - end - else - begin - if FNumFaces >= FMaxFaces then - begin - FreeTypeDoneFace(FFaces[0]); - - Move(FFaces[1], FFaces[0], (Length(FFaces) - 1) * SizeOF(PAggFreeTypeFace)); - Move(FFaceNames[1], FFaceNames[0], (Length(FFaceNames) - 1) * SizeOf(TAggBytes)); - SetLength(FFaces, Length(FFaces) - 1); - SetLength(FFaceNames, Length(FFaceNames) - 1); - - Dec(FNumFaces); - end; - - if (FontMem <> nil) and (FontMemSize > 0) then - FLastError := FreeTypeNewMemoryFace( - FLibrary, - PAggFreeTypeByte(FontMem), - FontMemSize, - FaceIndex, - FCurFace) - else - FLastError := FreeTypeNewFace( - FLibrary, - @FFaceName[0], - FaceIndex, - FCurFace); - - if FLastError = 0 then - begin - SetLength(FFaceNames, Length(FFaceNames) + 1); - SetLength(FFaceNames[Length(FFaceNames) - 1], Length(FFaceName)); - Move(FFaceName[0], FFaceNames[Length(FFaceNames) - 1][0], Length(FFaceName)); - - SetLength(FFaces, Length(FFaces) + 1); - FFaces[Length(FFaces) - 1] := FCurFace; - - Inc(FNumFaces); - end - else - begin - FCurFace := nil; - SetLength(FFaceName, 0); - end; - end; - - if FLastError = 0 then - begin - Result := True; - - case RenType of - grNativeMono: - FGlyphRendering := grNativeMono; - - grNativeGray8: - FGlyphRendering := grNativeGray8; - - grOutline: - if FreeTypeIsScalable(FCurFace) then - FGlyphRendering := grOutline - else - FGlyphRendering := grNativeGray8; - - grAggMono: - if FreeTypeIsScalable(FCurFace) then - FGlyphRendering := grAggMono - else - FGlyphRendering := grNativeMono; - - grAggGray8: - if FreeTypeIsScalable(FCurFace) then - FGlyphRendering := grAggGray8 - else - FGlyphRendering := grNativeGray8; - end; - - UpdateSignature; - end; - end; -end; - -function TAggFontEngineFreetypeBase.Attach(FileName: string): Boolean; -var - AnsiFileName: TAggBytes; -begin - Result := False; - - if FCurFace <> nil then - begin - AnsiFileName := TEncoding.UTF8.GetBytes(FileName); - FLastError := FreeTypeAttachFile(FCurFace, @AnsiFileName[0]); - - Result := FLastError = 0; - end; -end; - -function TAggFontEngineFreetypeBase.SetCharMap(Map: TAggFreeTypeEncoding): Boolean; -begin - Result := False; - - if FCurFace <> nil then - begin - FLastError := FreeTypeSelectCharmap(FCurFace, Map); - - if FLastError = 0 then - begin - FCharMap := Map; - - UpdateSignature; - - Result := True; - end; - end; -end; - -function TAggFontEngineFreetypeBase.SetHeight(Value: Double): Boolean; -begin - Result := False; - FHeight := Trunc(Value * 64.0); - - if FCurFace <> nil then - begin - UpdateCharSize; - - Result := True; - end; -end; - -function TAggFontEngineFreetypeBase.SetWidth(Value: Double): Boolean; -begin - Result := False; - FWidth := Trunc(Value * 64.0); - - if FCurFace <> nil then - begin - UpdateCharSize; - - Result := True; - end; -end; - -procedure TAggFontEngineFreetypeBase.SetHinting(Value: Boolean); -begin - FHinting := Value; - - if FCurFace <> nil then - UpdateSignature; -end; - -procedure TAggFontEngineFreetypeBase.SetFlipY(Flip: Boolean); -begin - FFlipY := Flip; - - if FCurFace <> nil then - UpdateSignature; -end; - -procedure TAggFontEngineFreetypeBase.SetTransform(Affine: TAggTransAffine); -begin - FAffine.AssignAll(Affine); - - if FCurFace <> nil then - UpdateSignature; -end; - -procedure TAggFontEngineFreetypeBase.SetGamma(F: TAggCustomVertexSource); -begin - FRasterizer.Gamma(F); -end; - -function TAggFontEngineFreetypeBase.GetLastError: Integer; -begin - Result := FLastError; -end; - -function TAggFontEngineFreetypeBase.GetResolution: Cardinal; -begin - Result := FResolution; -end; - -function TAggFontEngineFreetypeBase.GetName: string; -begin - Result := TEncoding.UTF8.GetString(FFaceName); -end; - -function TAggFontEngineFreetypeBase.GetNum_faces: Cardinal; -begin - if FCurFace <> nil then - Result := FCurFace.NumFaces - else - Result := 0; -end; - -function TAggFontEngineFreetypeBase.GetCharMap: TAggFreeTypeEncoding; -begin - Result := FCharMap; -end; - -function TAggFontEngineFreetypeBase.GetHeight: Double; -begin - Result := FHeight / 64.0; -end; - -function TAggFontEngineFreetypeBase.GetWidth: Double; -begin - Result := FWidth / 64.0; -end; - -function TAggFontEngineFreetypeBase.GetAscender: Double; -begin - if FCurFace <> nil then - Result := FCurFace.Ascender * GetHeight / FCurFace.UnitsPerEM - else - Result := 0.0; -end; - -function TAggFontEngineFreetypeBase.GetDefaultLineSpacing: Double; -begin - if FCurFace <> nil then - begin - Result := FCurFace.Height * GetHeight / FCurFace.UnitsPerEM; - end else - Result := 0.0; -end; - -function TAggFontEngineFreetypeBase.GetDescender: Double; -begin - if FCurFace <> nil then - Result := FCurFace.Descender * GetHeight / FCurFace.UnitsPerEM - else - Result := 0.0; -end; - -function TAggFontEngineFreetypeBase.GetFontSignature: TAggBytes; -begin - Result := FSignature; -end; - -function TAggFontEngineFreetypeBase.ChangeStamp: Integer; -begin - Result := FChangeStamp; -end; - -function TAggFontEngineFreetypeBase.PrepareGlyph(GlyphCode: Cardinal): Boolean; -var - Fl: Integer; - Bnd: TRectDouble; -begin - Result := False; - - FGlyphIndex := FreeTypeGetCharIndex(FCurFace, GlyphCode); - - if FHinting then - FLastError := FreeTypeLoadGlyph(FCurFace, FGlyphIndex, - CAggFreeTypeLoadDefault) - else - FLastError := FreeTypeLoadGlyph(FCurFace, FGlyphIndex, - CAggFreeTypeLoadNoHinting); - - if FLastError = 0 then - case FGlyphRendering of - grNativeMono: - begin - FLastError := FreeTypeRenderGlyph(FCurFace.Glyph, - CAggFreeTypeRenderModeMono); - - if FLastError = 0 then - begin - if FFlipY then - Fl := -FCurFace.Glyph.BitmapTop - else - Fl := FCurFace.Glyph.BitmapTop; - - DecomposeFreeTypeBitmapMono(@FCurFace.Glyph.Bitmap, - FCurFace.Glyph.BitmapLeft, Fl, FFlipY, FScanLineBin, - FScanLinesBin); - - FBounds.X1 := FScanLinesBin.MinimumX; - FBounds.Y1 := FScanLinesBin.MinimumY; - FBounds.X2 := FScanLinesBin.MaximumX; - FBounds.Y2 := FScanLinesBin.MaximumY; - FDataSize := FScanLinesBin.ByteSize; - FDataType := gdMono; - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - Result := True; - end; - end; - - grNativeGray8: - begin - FLastError := FreeTypeRenderGlyph(FCurFace.Glyph, - CAggFreeTypeRenderModeNormal); - - if FLastError = 0 then - begin - if FFlipY then - Fl := -FCurFace.Glyph.BitmapTop - else - Fl := FCurFace.Glyph.BitmapTop; - - DecomposeFreeTypeBitmapGray8(@FCurFace.Glyph.Bitmap, - FCurFace.Glyph.BitmapLeft, Fl, FFlipY, FRasterizer, - FScanLineAA, FScanLinesAA); - - FBounds.X1 := FScanLinesAA.MinimumX; - FBounds.Y1 := FScanLinesAA.MinimumY; - FBounds.X2 := FScanLinesAA.MaximumX; - FBounds.Y2 := FScanLinesAA.MaximumY; - FDataSize := FScanLinesAA.ByteSize; - FDataType := gdGray8; - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - Result := True; - end; - end; - - grOutline: - if FLastError = 0 then - if FFlag32 then - begin - FPath32.RemoveAll; - - if DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, - FAffine, FPath32) then - begin - Bnd := FPath32.GetBoundingRect; - - FDataSize := FPath32.ByteSize; - FDataType := gdOutline; - FBounds.X1 := Floor(Bnd.X1); - FBounds.Y1 := Floor(Bnd.Y1); - FBounds.X2 := Ceil(Bnd.X2); - FBounds.Y2 := Ceil(Bnd.Y2); - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); - - Result := True; - end; - - end - else - begin - FPath16.RemoveAll; - - if DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, - FAffine, FPath16) then - begin - Bnd := FPath16.GetBoundingRect; - - FDataSize := FPath16.ByteSize; - FDataType := gdOutline; - FBounds.X1 := Floor(Bnd.X1); - FBounds.Y1 := Floor(Bnd.Y1); - FBounds.X2 := Ceil(Bnd.X2); - FBounds.Y2 := Ceil(Bnd.Y2); - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); - - Result := True; - end; - end; - - grAggMono: - if FLastError = 0 then - begin - FRasterizer.Reset; - - if FFlag32 then - begin - FPath32.RemoveAll; - - DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, - FPath32); - - FRasterizer.AddPath(FCurves32); - end - else - begin - FPath16.RemoveAll; - - DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, - FPath16); - - FRasterizer.AddPath(FCurves16); - end; - - FScanLinesBin.Prepare(1); // Remove all - - RenderScanLines(FRasterizer, FScanLineBin, FScanLinesBin); - - FBounds.X1 := FScanLinesBin.MinimumX; - FBounds.Y1 := FScanLinesBin.MinimumY; - FBounds.X2 := FScanLinesBin.MaximumX; - FBounds.Y2 := FScanLinesBin.MaximumY; - FDataSize := FScanLinesBin.ByteSize; - FDataType := gdMono; - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); - - Result := True; - end; - - grAggGray8: - if FLastError = 0 then - begin - FRasterizer.Reset; - - if FFlag32 then - begin - FPath32.RemoveAll; - - DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, - FPath32); - - FRasterizer.AddPath(FCurves32); - - end - else - begin - FPath16.RemoveAll; - - DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, - FPath16); - - FRasterizer.AddPath(FCurves16); - end; - - FScanLinesAA.Prepare(1); // Remove all - - RenderScanLines(FRasterizer, FScanLineAA, FScanLinesAA); - - FBounds.X1 := FScanLinesAA.MinimumX; - FBounds.Y1 := FScanLinesAA.MinimumY; - FBounds.X2 := FScanLinesAA.MaximumX; - FBounds.Y2 := FScanLinesAA.MaximumY; - FDataSize := FScanLinesAA.ByteSize; - FDataType := gdGray8; - FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); - FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); - - FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); - - Result := True; - end; - end; -end; - -function TAggFontEngineFreetypeBase.GetGlyphIndex: Cardinal; -begin - Result := FGlyphIndex; -end; - -function TAggFontEngineFreetypeBase.GetDataSize: Cardinal; -begin - Result := FDataSize; -end; - -function TAggFontEngineFreetypeBase.GetDataType: TAggGlyphData; -begin - Result := FDataType; -end; - -function TAggFontEngineFreetypeBase.GetBounds: PRectInteger; -begin - Result := @FBounds; -end; - -function TAggFontEngineFreetypeBase.GetAdvanceX: Double; -begin - Result := FAdvanceX; -end; - -function TAggFontEngineFreetypeBase.GetAdvanceY: Double; -begin - Result := FAdvanceY; -end; - -procedure TAggFontEngineFreetypeBase.WriteGlyphTo(Data: PInt8u); -begin - if (Data <> nil) and (FDataSize <> 0) then - case FDataType of - gdMono: - FScanLinesBin.Serialize(Data); - - gdGray8: - FScanLinesAA.Serialize(Data); - - gdOutline: - if FFlag32 then - FPath32.Serialize(Data) - else - FPath16.Serialize(Data); - end; -end; - -function TAggFontEngineFreetypeBase.AddKerning(First, Second: Cardinal; - X, Y: PDouble): Boolean; -var - Delta : TAggFreeTypeVector; - Dx, Dy: Double; -begin - if (FCurFace <> nil) and (First <> 0) and (Second <> 0) and - FreeTypeHasKerning(FCurFace) then - begin - FreeTypeGetKerning(FCurFace, First, Second, CAggFreeTypeKerningDefault, @Delta); - - Dx := Int26p6ToDouble(Delta.X); - Dy := Int26p6ToDouble(Delta.Y); - - if (FGlyphRendering = grOutline) or - (FGlyphRendering = grAggMono) or - (FGlyphRendering = grAggGray8) then - FAffine.Transform2x2(FAffine, @Dx, @Dy); - - X^ := X^ + Dx; - Y^ := Y^ + Dy; - - Result := True; - - end - else - Result := False; -end; - -function TAggFontEngineFreetypeBase.GetFlag32; -begin - Result := FFlag32; -end; - -procedure TAggFontEngineFreetypeBase.UpdateCharSize; -begin - if FCurFace <> nil then - begin - if FResolution <> 0 then - FreeTypeSetCharSize(FCurFace, FWidth, // char_width in 1/64th of points - FHeight, // char_height in 1/64th of points - FResolution, // horizontal device resolution - FResolution) // vertical device resolution - else - FreeTypeSetPixelSizes(FCurFace, FWidth shr 6, // pixel_width - FHeight shr 6); // pixel_height - - UpdateSignature; - end; -end; - -procedure TAggFontEngineFreetypeBase.UpdateSignature; -var - GammaHash, I: Cardinal; - GammaTable: array [0..CAggAntiAliasingNum - 1] of Int8u; - MatrixData: TAggParallelogram; - Str: string; -begin - if (FCurFace <> nil) and (Length(FFaceName) <> 0) then - begin - - GammaHash := 0; - - if (FGlyphRendering = grNativeGray8) - or (FGlyphRendering = grAggMono) - or (FGlyphRendering = grAggGray8) then - begin - for I := 0 to CAggAntiAliasingNum - 1 do - GammaTable[I] := FRasterizer.ApplyGamma(I); - - GammaHash := Calc_crc32(@GammaTable, SizeOf(GammaTable)); - end; - - Str := ''; - I := 0; - while (I < Length(FFaceName)) and (FFaceName[I] <> 0) do - begin - Str := Str + Char(FFaceName[I]); - Inc(I); - end; - - Str := Str + Format(',%d%d%d%d,%d,%d,%d:%dx%d,%d,%d,%x', [ - FCharMap[0], FCharMap[1], FCharMap[2], FCharMap[3], - FFaceIndex, Integer(FGlyphRendering), FResolution, FHeight, - FWidth, Integer(FHinting), Integer(FFlipY), GammaHash]); - - if (FGlyphRendering = grOutline) or - (FGlyphRendering = grAggMono) or - (FGlyphRendering = grAggGray8) then - begin - FAffine.StoreTo(@MatrixData); - - Str := Str + Format(',%x,%x,%x,%x,%x,%x', [ - DoubleToPlainFixedPoint(MatrixData[0]), - DoubleToPlainFixedPoint(MatrixData[1]), - DoubleToPlainFixedPoint(MatrixData[2]), - DoubleToPlainFixedPoint(MatrixData[3]), - DoubleToPlainFixedPoint(MatrixData[4]), - DoubleToPlainFixedPoint(MatrixData[5])]); - end; - - FSignature := TEncoding.UTF8.GetBytes(Str + #0); - - Inc(FChangeStamp); - end; -end; - -function TAggFontEngineFreetypeBase.FindFace(Name: TAggBytes): Integer; -var - I: Cardinal; -begin - Result := -1; - - I := 0; - - while I < Length(FFaceNames) do - begin - if (Length(Name) = Length(FFaceNames[I])) - and CompareMem(@Name[0], @FFaceNames[I][0], Length(Name)) then - begin - Result := I; - Exit; - end; - - Inc(I); - end; -end; - -{ TAggFontEngineFreetypeInt16 } - -constructor TAggFontEngineFreetypeInt16.Create(MaxFaces: Cardinal = 32); -begin - inherited Create(False, MaxFaces); -end; - -{ TAggFontEngineFreetypeInt32 } - -constructor TAggFontEngineFreetypeInt32.Create(MaxFaces: Cardinal = 32); -begin - inherited Create(True, MaxFaces); -end; - -end. +unit AggFontFreeType; + +//////////////////////////////////////////////////////////////////////////////// +// // +// Anti-Grain Geometry (modernized Pascal fork, aka 'AggPasMod') // +// Maintained by Christian-W. Budde (Christian@pcjv.de) // +// Copyright (c) 2012-2020 // +// // +// Based on: // +// Pascal port by Milan Marusinec alias Milano (milan@marusinec.sk) // +// Copyright (c) 2005-2006, see http://www.aggpas.org // +// // +// Original License: // +// Anti-Grain Geometry - Version 2.4 (Public License) // +// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) // +// Contact: McSeem@antigrain.com / McSeemAgg@yahoo.com // +// // +// Permission to copy, use, modify, sell and distribute this software // +// is granted provided this copyright notice appears in all copies. // +// This software is provided "as is" without express or implied // +// warranty, and with no claim as to its suitability for any purpose. // +// // +//////////////////////////////////////////////////////////////////////////////// +// B.Verhue 1-11-2016 // +// // +// - Replaced AnsiString with byte array and AnsiChar with byte // +// - Used TEncodig class to convert from string to bytes and vice versa // +// - Relpaced pointer lists with dynamic arrays // +// // +//////////////////////////////////////////////////////////////////////////////// + +interface + +{$I AggCompiler.inc} + +uses + SysUtils, + Math, + AggFontFreeTypeLib, + AggBasics, + AggFontEngine, + AggFontCacheManager, + AggTransAffine, + AggVertexSource, + AggPathStorageInteger, + AggConvCurve, + AggScanLine, + AggScanlineUnpacked, + AggScanLineBin, + AggRasterizerScanLineAA, + AggRendererScanLine, + AggRenderScanLines, + AggBitsetIterator; + +type + TAggFontEngineFreetypeBase = class(TAggCustomFontEngine) + private + FFlag32: Boolean; + + FChangeStamp, FLastError: Integer; + + FFaceName: TAggBytes; + FFaceIndex: Cardinal; + FCharMap: TAggFreeTypeEncoding; + FSignature: TAggBytes; + + FHeight, FWidth: Cardinal; + + FHinting, FFlipY, FLibraryInitialized: Boolean; + + FLibrary: PAggFreeTypeLibrary; // handle to library + + FFaces: array of PAggFreeTypeFace; // A pool of font faces + FFaceNames: array of TAggBytes; + FNumFaces, FMaxFaces: Cardinal; + FCurFace: PAggFreeTypeFace; // handle to the current face object + + FResolution: Integer; + + FGlyphRendering: TAggGlyphRendering; + FGlyphIndex, FDataSize: Cardinal; + FDataType: TAggGlyphData; + + FBounds: TRectInteger; + FAdvanceX, FAdvanceY: Double; + FAffine: TAggTransAffine; + + FPath16: TAggPathStorageInt16; + FPath32: TAggPathStorageInt32; + FCurves16, FCurves32: TAggConvCurve; + + FScanLineAA: TAggScanLineUnpacked8; + FScanLineBin: TAggScanLineBin; + FScanLinesAA: TAggScanLinesAA; + FScanLinesBin: TAggScanLinesBin; + FRasterizer: TAggRasterizerScanLineAA; + + // private + procedure UpdateCharSize; + procedure UpdateSignature; + + function FindFace(Name: TAggBytes): Integer; + + procedure SetHinting(Value: Boolean); + procedure SetFlipY(Flip: Boolean); + protected + function GetGlyphIndex: Cardinal; override; + function GetDataSize: Cardinal; override; + function GetDataType: TAggGlyphData; override; + function GetAdvanceX: Double; override; + function GetAdvanceY: Double; override; + function GetAscender: Double; override; + function GetDescender: Double; override; + function GetDefaultLineSpacing: Double; override; + function GetFlag32: Boolean; override; + public + constructor Create(AFlag32: Boolean; MaxFaces: Cardinal = 32); + destructor Destroy; override; + + // Set font parameters + procedure SetResolution(Dpi: Cardinal); + + // Get some name info to enable font selection + function GetNameInfo(Face: PAggFreeTypeFace; var FontFamily, FontSubFamily, + UniqueFontID, FullFontName: string): boolean; overload; + function GetNameInfo(FontName: string; var FontFamily, FontSubFamily, + UniqueFontID, FullFontName: string): boolean; overload; + + function LoadFont(FontName: string; FaceIndex: Cardinal; + RenType: TAggGlyphRendering; FontMem: PAggFreeTypeByte = nil; + FontMemSize: Integer = 0): Boolean; + + function Attach(FileName: string): Boolean; + + function SetCharMap(Map: TAggFreeTypeEncoding): Boolean; + function SetHeight(Value: Double): Boolean; + function SetWidth(Value: Double): Boolean; + procedure SetTransform(Affine: TAggTransAffine); + + // Set Gamma + procedure SetGamma(F: TAggCustomVertexSource); + + // Accessors + function GetLastError: Integer; + function GetResolution: Cardinal; + function GetName: string; + function GetNum_faces: Cardinal; + function GetCharMap: TAggFreeTypeEncoding; + function GetHeight: Double; + function GetWidth: Double; + + // Interface mandatory to implement for TAggFontCacheManager + function GetFontSignature: TAggBytes; override; + function GetBounds: PRectInteger; override; + function ChangeStamp: Integer; override; + + function PrepareGlyph(GlyphCode: Cardinal): Boolean; override; + + procedure WriteGlyphTo(Data: PInt8u); override; + function AddKerning(First, Second: Cardinal; X, Y: PDouble): Boolean; + override; + + property FlipY: Boolean read FFlipY write SetFlipY; + property Hinting: Boolean read FHinting write SetHinting; + property Height: Double read GetHeight; + end; + + // ------------------------------------------------FontEngineFreetypeInt16 + // This class uses values of type int16 (10.6 format) for the vector cache. + // The vector cache is compact, but when rendering glyphs of height + // more that 200 there integer overfLow can occur. + TAggFontEngineFreetypeInt16 = class(TAggFontEngineFreetypeBase) + public + constructor Create(MaxFaces: Cardinal = 32); + end; + + // ------------------------------------------------FontEngineFreetypeInt32 + // This class uses values of type int32 (26.6 format) for the vector cache. + // The vector cache is twice larger than in FontEngineFreetypeInt16, + // but it allows you to render glyphs of very large sizes. + TAggFontEngineFreetypeInt32 = class(TAggFontEngineFreetypeBase) + public + constructor Create(MaxFaces: Cardinal = 32); + end; + +implementation + + +// ------------------------------------------------------------------------------ +// +// This code implements the AUTODIN II polynomial +// The variable corresponding to the macro argument "crc" should +// be an Cardinal long. +// Oroginal code by Spencer Garrett <srg@quick.com> +// +// generated using the AUTODIN II polynomial +// x^32 + x^26 + x^23 + x^22 + x^16 + +// x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + 1 +// +// ------------------------------------------------------------------------------ +const + Crc32tab: array [0..255] of Cardinal = ($00000000, $77073096, $EE0E612C, + $990951BA, $076DC419, $706AF48F, $E963A535, $9E6495A3, $0EDB8832, $79DCB8A4, + $E0D5E91E, $97D2D988, $09B64C2B, $7EB17CBD, $E7B82D07, $90BF1D91, $1DB71064, + $6AB020F2, $F3B97148, $84BE41DE, $1ADAD47D, $6DDDE4EB, $F4D4B551, $83D385C7, + $136C9856, $646BA8C0, $FD62F97A, $8A65C9EC, $14015C4F, $63066CD9, $FA0F3D63, + $8D080DF5, $3B6E20C8, $4C69105E, $D56041E4, $A2677172, $3C03E4D1, $4B04D447, + $D20D85FD, $A50AB56B, $35B5A8FA, $42B2986C, $DBBBC9D6, $ACBCF940, $32D86CE3, + $45DF5C75, $DCD60DCF, $ABD13D59, $26D930AC, $51DE003A, $C8D75180, $BFD06116, + $21B4F4B5, $56B3C423, $CFBA9599, $B8BDA50F, $2802B89E, $5F058808, $C60CD9B2, + $B10BE924, $2F6F7C87, $58684C11, $C1611DAB, $B6662D3D, $76DC4190, $01DB7106, + $98D220BC, $EFD5102A, $71B18589, $06B6B51F, $9FBFE4A5, $E8B8D433, $7807C9A2, + $0F00F934, $9609A88E, $E10E9818, $7F6A0DBB, $086D3D2D, $91646C97, $E6635C01, + $6B6B51F4, $1C6C6162, $856530D8, $F262004E, $6C0695ED, $1B01A57B, $8208F4C1, + $F50FC457, $65B0D9C6, $12B7E950, $8BBEB8EA, $FCB9887C, $62DD1DDF, $15DA2D49, + $8CD37CF3, $FBD44C65, $4DB26158, $3AB551CE, $A3BC0074, $D4BB30E2, $4ADFA541, + $3DD895D7, $A4D1C46D, $D3D6F4FB, $4369E96A, $346ED9FC, $AD678846, $DA60B8D0, + $44042D73, $33031DE5, $AA0A4C5F, $DD0D7CC9, $5005713C, $270241AA, $BE0B1010, + $C90C2086, $5768B525, $206F85B3, $B966D409, $CE61E49F, $5EDEF90E, $29D9C998, + $B0D09822, $C7D7A8B4, $59B33D17, $2EB40D81, $B7BD5C3B, $C0BA6CAD, $EDB88320, + $9ABFB3B6, $03B6E20C, $74B1D29A, $EAD54739, $9DD277AF, $04DB2615, $73DC1683, + $E3630B12, $94643B84, $0D6D6A3E, $7A6A5AA8, $E40ECF0B, $9309FF9D, $0A00AE27, + $7D079EB1, $F00F9344, $8708A3D2, $1E01F268, $6906C2FE, $F762575D, $806567CB, + $196C3671, $6E6B06E7, $FED41B76, $89D32BE0, $10DA7A5A, $67DD4ACC, $F9B9DF6F, + $8EBEEFF9, $17B7BE43, $60B08ED5, $D6D6A3E8, $A1D1937E, $38D8C2C4, $4FDFF252, + $D1BB67F1, $A6BC5767, $3FB506DD, $48B2364B, $D80D2BDA, $AF0A1B4C, $36034AF6, + $41047A60, $DF60EFC3, $A867DF55, $316E8EEF, $4669BE79, $CB61B38C, $BC66831A, + $256FD2A0, $5268E236, $CC0C7795, $BB0B4703, $220216B9, $5505262F, $C5BA3BBE, + $B2BD0B28, $2BB45A92, $5CB36A04, $C2D7FFA7, $B5D0CF31, $2CD99E8B, $5BDEAE1D, + $9B64C2B0, $EC63F226, $756AA39C, $026D930A, $9C0906A9, $EB0E363F, $72076785, + $05005713, $95BF4A82, $E2B87A14, $7BB12BAE, $0CB61B38, $92D28E9B, $E5D5BE0D, + $7CDCEFB7, $0BDBDF21, $86D3D2D4, $F1D4E242, $68DDB3F8, $1FDA836E, $81BE16CD, + $F6B9265B, $6FB077E1, $18B74777, $88085AE6, $FF0F6A70, $66063BCA, $11010B5C, + $8F659EFF, $F862AE69, $616BFFD3, $166CCF45, $A00AE278, $D70DD2EE, $4E048354, + $3903B3C2, $A7672661, $D06016F7, $4969474D, $3E6E77DB, $AED16A4A, $D9D65ADC, + $40DF0B66, $37D83BF0, $A9BCAE53, $DEBB9EC5, $47B2CF7F, $30B5FFE9, $BDBDF21C, + $CABAC28A, $53B39330, $24B4A3A6, $BAD03605, $CDD70693, $54DE5729, $23D967BF, + $B3667A2E, $C4614AB8, $5D681B02, $2A6F2B94, $B40BBE37, $C30C8EA1, $5A05DF1B, + $2D02EF8D); + + +function Calc_crc32(Buf: PInt8u; Size: Cardinal): Cardinal; +var + Crc, Len, Nr: Cardinal; + + P: PInt8u; + +begin + Crc := Cardinal(not 0); + Len := 0; + Nr := Size; + Len := Len + Nr; + P := Buf; + + while Nr <> 0 do + begin + Dec(Nr); + + Crc := (Crc shr 8) xor Crc32tab[(Crc xor P^) and $FF]; + + Inc(PtrComp(P), SizeOf(Int8u)); + end; + + Result := not Crc; +end; + +function DoubleToPlainFixedPoint(D: Double): Integer; +begin + Result := Trunc(D * 65536.0) +end; + +function Int26p6ToDouble(P: Integer): Double; +begin + Result := P / 64.0; +end; + +function DoubleToInt26p6(P: Double): Integer; +begin + Result := Trunc(P * 64.0 + 0.5); +end; + +function DecomposeFreeTypeOutline(Outline: PAggFreeTypeOutline; FlipY: Boolean; Mtx: TAggTransAffine; Path: TAggCustomPathStorageInteger): Boolean; +var + V_last, V_control, V_start, Vec, V_middle, Vec1, Vec2: TAggFreeTypeVector; + + X1, Y1, X2, Y2, X3, Y3: Double; + + Point, Limit: PAggFreeTypeVector; + + Tags: PAggFreeTypeByte; + + N, // index of contour in outline + First, // index of first point in contour + Last: Integer; // index of last point in contour + + Tag: TAggFreeTypeByte; // current point's state + +label + Do_Conic, Close; + +begin + First := 0; + N := 0; + + while N < Outline.NumContours do + begin + Last := PAggFreeTypeShort(PtrComp(Outline.Contours) + N * SizeOf(TAggFreeTypeShort))^; + Limit := PAggFreeTypeVector(PtrComp(Outline.Points) + Last * SizeOf(TAggFreeTypeVector)); + + V_start := PAggFreeTypeVector(PtrComp(Outline.Points) + First * SizeOf(TAggFreeTypeVector))^; + V_last := PAggFreeTypeVector(PtrComp(Outline.Points) + Last * SizeOf(TAggFreeTypeVector))^; + + V_control := V_start; + + Point := PAggFreeTypeVector(PtrComp(Outline.Points) + First * SizeOf(TAggFreeTypeVector)); + Tags := PAggFreeTypeByte(PtrComp(Outline.Tags) + First * SizeOf(TAggFreeTypeByte)); + Tag := FreeTypeCurveTag(Tags^); + + // A contour cannot start with a cubic control point! + if Tag = CAggFreeTypeCurveTagCubic then + begin + Result := False; + Exit; + end; + + // check first point to determine origin + if Tag = CAggFreeTypeCurveTagConic then + begin + // first point is conic control. Yes, this happens. + if FreeTypeCurveTag(PAggFreeTypeByte(PtrComp(Outline.Tags) + Last)^) + = CAggFreeTypeCurveTagOn then + begin + // start at last point if it is on the curve + V_start := V_last; + + Dec(Limit); + + end + else + begin + // if both first and last points are conic, + // start at their middle and record its position + // for closure + V_start.X := (V_start.X + V_last.X) div 2; + V_start.Y := (V_start.Y + V_last.Y) div 2; + + V_last := V_start; + end; + + Dec(PtrComp(Point), SizeOf(TAggFreeTypeVector)); + Dec(PtrComp(Tags)); + end; + + X1 := Int26p6ToDouble(V_start.X); + Y1 := Int26p6ToDouble(V_start.Y); + + if FlipY then + Y1 := -Y1; + + Mtx.Transform(Mtx, @X1, @Y1); + Path.MoveTo(DoubleToInt26p6(X1), DoubleToInt26p6(Y1)); + + while PtrComp(Point) < PtrComp(Limit) do + begin + Inc(PtrComp(Point), SizeOf(TAggFreeTypeVector)); + Inc(PtrComp(Tags)); + + Tag := FreeTypeCurveTag(Tags^); + + case Tag of + // emit a single LineTo + CAggFreeTypeCurveTagOn: + begin + X1 := Int26p6ToDouble(Point.X); + Y1 := Int26p6ToDouble(Point.Y); + + if FlipY then + Y1 := -Y1; + + Mtx.Transform(Mtx, @X1, @Y1); + Path.LineTo(DoubleToInt26p6(X1), DoubleToInt26p6(Y1)); + + Continue; + end; + + // consume conic arcs + CAggFreeTypeCurveTagConic: + begin + V_control.X := Point.X; + V_control.Y := Point.Y; + + Do_Conic: + if PtrComp(Point) < PtrComp(Limit) then + begin + Inc(PtrComp(Point), SizeOf(TAggFreeTypeVector)); + Inc(PtrComp(Tags)); + + Tag := FreeTypeCurveTag(Tags^); + + Vec.X := Point.X; + Vec.Y := Point.Y; + + if Tag = CAggFreeTypeCurveTagOn then + begin + X1 := Int26p6ToDouble(V_control.X); + Y1 := Int26p6ToDouble(V_control.Y); + X2 := Int26p6ToDouble(Vec.X); + Y2 := Int26p6ToDouble(Vec.Y); + + if FlipY then + begin + Y1 := -Y1; + Y2 := -Y2; + end; + + Mtx.Transform(Mtx, @X1, @Y1); + Mtx.Transform(Mtx, @X2, @Y2); + + Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), + DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); + + Continue; + end; + + if Tag <> CAggFreeTypeCurveTagConic then + begin + Result := False; + + Exit; + end; + + V_middle.X := (V_control.X + Vec.X) div 2; + V_middle.Y := (V_control.Y + Vec.Y) div 2; + + X1 := Int26p6ToDouble(V_control.X); + Y1 := Int26p6ToDouble(V_control.Y); + X2 := Int26p6ToDouble(V_middle.X); + Y2 := Int26p6ToDouble(V_middle.Y); + + if FlipY then + begin + Y1 := -Y1; + Y2 := -Y2; + end; + + Mtx.Transform(Mtx, @X1, @Y1); + Mtx.Transform(Mtx, @X2, @Y2); + + Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), + DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); + + V_control := Vec; + + goto Do_Conic; + end; + + X1 := Int26p6ToDouble(V_control.X); + Y1 := Int26p6ToDouble(V_control.Y); + X2 := Int26p6ToDouble(V_start.X); + Y2 := Int26p6ToDouble(V_start.Y); + + if FlipY then + begin + Y1 := -Y1; + Y2 := -Y2; + end; + + Mtx.Transform(Mtx, @X1, @Y1); + Mtx.Transform(Mtx, @X2, @Y2); + + Path.Curve3To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), + DoubleToInt26p6(X2), DoubleToInt26p6(Y2)); + + goto Close; + end; + + // TAggFreeTypeCurveTag_CUBIC + else + begin + if (PtrComp(Point) + SizeOf(TAggFreeTypeVector) > PtrComp(Limit)) or + (FreeTypeCurveTag(PAggFreeTypeByte(PtrComp(Tags) + 1)^) <> CAggFreeTypeCurveTagCubic) then + begin + Result := False; + + Exit; + end; + + Vec1.X := Point.X; + Vec1.Y := Point.Y; + Vec2.X := PAggFreeTypeVector(PtrComp(Point) + SizeOf(TAggFreeTypeVector)).X; + Vec2.Y := PAggFreeTypeVector(PtrComp(Point) + SizeOf(TAggFreeTypeVector)).Y; + + Inc(PtrComp(Point), 2 * SizeOf(TAggFreeTypeVector)); + Inc(PtrComp(Tags), 2); + + if PtrComp(Point) <= PtrComp(Limit) then + begin + Vec.X := Point.X; + Vec.Y := Point.Y; + + X1 := Int26p6ToDouble(Vec1.X); + Y1 := Int26p6ToDouble(Vec1.Y); + X2 := Int26p6ToDouble(Vec2.X); + Y2 := Int26p6ToDouble(Vec2.Y); + X3 := Int26p6ToDouble(Vec.X); + Y3 := Int26p6ToDouble(Vec.Y); + + if FlipY then + begin + Y1 := -Y1; + Y2 := -Y2; + Y3 := -Y3; + end; + + Mtx.Transform(Mtx, @X1, @Y1); + Mtx.Transform(Mtx, @X2, @Y2); + Mtx.Transform(Mtx, @X3, @Y3); + + Path.Curve4To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), + DoubleToInt26p6(X2), DoubleToInt26p6(Y2), DoubleToInt26p6(X3), + DoubleToInt26p6(Y3)); + + Continue; + end; + + X1 := Int26p6ToDouble(Vec1.X); + Y1 := Int26p6ToDouble(Vec1.Y); + X2 := Int26p6ToDouble(Vec2.X); + Y2 := Int26p6ToDouble(Vec2.Y); + X3 := Int26p6ToDouble(V_start.X); + Y3 := Int26p6ToDouble(V_start.Y); + + if FlipY then + begin + Y1 := -Y1; + Y2 := -Y2; + Y3 := -Y3; + end; + + Mtx.Transform(Mtx, @X1, @Y1); + Mtx.Transform(Mtx, @X2, @Y2); + Mtx.Transform(Mtx, @X3, @Y3); + + Path.Curve4To(DoubleToInt26p6(X1), DoubleToInt26p6(Y1), + DoubleToInt26p6(X2), DoubleToInt26p6(Y2), DoubleToInt26p6(X3), + DoubleToInt26p6(Y3)); + + goto Close; + end; + end; + end; + + Path.ClosePolygon; + + Close: + First := Last + 1; + + Inc(N); + end; + + Result := True; +end; + +procedure DecomposeFreeTypeBitmapMono(Bitmap: PAggFreeTypeBitmap; X, Y: Integer; + FlipY: Boolean; Sl: TAggCustomScanLine; Storage: TAggCustomRendererScanLine); +var + I, Pitch, J: Integer; + + Buf : PInt8u; + Bits: TAggBitsetIterator; + +begin + Buf := PInt8u(Bitmap.Buffer); + Pitch := Bitmap.Pitch; + + Sl.Reset(X, X + Bitmap.Width); + Storage.Prepare(Bitmap.Width + 2); + + if FlipY then + begin + Inc(PtrComp(Buf), Bitmap.Pitch * (Bitmap.Rows - 1)); + Inc(Y, Bitmap.Rows); + + Pitch := -Pitch; + end; + + I := 0; + + while I < Bitmap.Rows do + begin + Sl.ResetSpans; + + J := 0; + + Bits := TAggBitsetIterator.Create(Buf, 0); + try + while J < Bitmap.Width do + begin + if Bits.Bit <> 0 then + Sl.AddCell(X + J, CAggCoverFull); + + Bits.IncOperator; + + Inc(J); + end; + finally + Bits.Free; + end; + + Inc(PtrComp(Buf), Pitch * SizeOf(Int8u)); + + if Sl.NumSpans <> 0 then + begin + Sl.Finalize(Y - I - 1); + Storage.Render(Sl); + end; + + Inc(I); + end; +end; + +procedure DecomposeFreeTypeBitmapGray8(Bitmap: PAggFreeTypeBitmap; X, Y: Integer; + FlipY: Boolean; Ras: TAggRasterizerScanLineAA; Sl: TAggCustomScanLine; + Storage: TAggCustomRendererScanLine); +var + I, J, Pitch: Integer; + + Buf, P: PInt8u; + +begin + Buf := PInt8u(Bitmap.Buffer); + Pitch := Bitmap.Pitch; + + Sl.Reset(X, X + Bitmap.Width); + Storage.Prepare(Bitmap.Width + 2); + + if FlipY then + begin + Inc(PtrComp(Buf), Bitmap.Pitch * (Bitmap.Rows - 1)); + Inc(Y, Bitmap.Rows); + + Pitch := -Pitch; + end; + + I := 0; + + while I < Bitmap.Rows do + begin + Sl.ResetSpans; + + P := Buf; + J := 0; + + while J < Bitmap.Width do + begin + if P^ <> 0 then + Sl.AddCell(X + J, Ras.ApplyGamma(P^)); + + Inc(PtrComp(P), SizeOf(Int8u)); + Inc(J); + end; + + Inc(PtrComp(Buf), Pitch * SizeOf(Int8u)); + + if Sl.NumSpans <> 0 then + begin + Sl.Finalize(Y - I - 1); + Storage.Render(Sl); + end; + + Inc(I); + end; +end; + +{ TAggFontEngineFreetypeBase } + +constructor TAggFontEngineFreetypeBase.Create(AFlag32: Boolean; + MaxFaces: Cardinal = 32); +begin + FFlag32 := AFlag32; + + FChangeStamp := 0; + FLastError := 0; + + FFaceIndex := 0; + + FCharMap := CAggFreeTypeEncodingNone; + SetLength(FFaceName, 0); + + SetLength(FSignature, 0); + + FHeight := 0; + FWidth := 0; + FHinting := True; + FFlipY := False; + + FLibraryInitialized := False; + + FLibrary := nil; + + SetLength(FFaces, 0); + SetLength(FFaceNames, 0); + + FNumFaces := 0; + FMaxFaces := MaxFaces; + FCurFace := nil; + FResolution := 0; + + FGlyphRendering := grNativeGray8; + FGlyphIndex := 0; + FDataSize := 0; + FDataType := gdInvalid; + + FBounds := RectInteger(1, 1, 0, 0); + + FAdvanceX := 0.0; + FAdvanceY := 0.0; + + FAffine := TAggTransAffine.Create; + + FPath16 := TAggPathStorageInt16.Create; + FPath32 := TAggPathStorageInt32.Create; + FCurves16 := TAggConvCurve.Create(FPath16); + FCurves32 := TAggConvCurve.Create(FPath32); + FScanLineAA := TAggScanLineUnpacked8.Create; + FScanLineBin := TAggScanLineBin.Create; + FScanLinesAA := TAggScanLinesAA.Create; + FScanLinesBin := TAggScanLinesBin.Create; + FRasterizer := TAggRasterizerScanLineAA.Create; + + FCurves16.ApproximationScale := 4.0; + FCurves32.ApproximationScale := 4.0; + + FLastError := FreeTypeInit(@FLibrary); + + if FLastError = 0 then + FLibraryInitialized := True; +end; + +destructor TAggFontEngineFreetypeBase.Destroy; +var + I: Cardinal; +begin + I := 0; + + while I < Length(FFaces) do + begin + FreeTypeDoneFace(FFaces[I]); + + Inc(I); + end; + + Finalize(FFaceNames); + Finalize(FFaces); + + if FLibraryInitialized then + FreeTypeDone(FLibrary); + + FAffine.Free; + FPath16.Free; + FPath32.Free; + FCurves16.Free; + FCurves32.Free; + FScanLineAA.Free; + FScanLineBin.Free; + + FScanLinesAA.Free; + FScanLinesBin.Free; + FRasterizer.Free; + + inherited; +end; + +procedure TAggFontEngineFreetypeBase.SetResolution(Dpi: Cardinal); +begin + FResolution := Dpi; + + UpdateCharSize; +end; + +function TAggFontEngineFreetypeBase.GetNameInfo(Face: PAggFreeTypeFace; + var FontFamily, FontSubFamily, UniqueFontID, FullFontName: string): boolean; +var + NameCount: TAggFreeTypeUInt; + SfntName: TAggFreeTypeSfntName; + + function ConvertFontName: string; + var + i: integer; + NameBuffer: TAggBytes; + begin + Result := ''; + SetLength(NameBuffer, SfntName.StrLen); + for i := 0 to SFntName.StrLen - 1 do + NameBuffer[i] := PByteArray(SfntName.Str)^[i]; + + // TODO check more encoding combinations + case SfntName.PlatformID of + 0: case SfntName.EncodingID of + 3: Result := TEncoding.BigEndianUnicode.GetString(NameBuffer); + end; + 1: case SfntName.EncodingID of + 0: Result := TEncoding.ANSI.GetString(NameBuffer); + end; + 3: case SfntName.EncodingID of + 1: Result := TEncoding.BigEndianUnicode.GetString(NameBuffer); + end; + end; + end; + +begin + // See http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-chapter08#3054f18b + + Result := False; + + NameCount := FreeTypeGetSfntNameCount(Face); + if NameCount < 5 then + exit; + + Result := True; + + if FreeTypeGetSfntName(Face, 1, SfntName) = 0 then + FontFamily := ConvertFontName; + + if FreeTypeGetSfntName(Face, 2, SfntName) = 0 then + FontSubFamily := ConvertFontName; + + if FreeTypeGetSfntName(Face, 3, SfntName) = 0 then + UniqueFontID := ConvertFontName; + + if FreeTypeGetSfntName(Face, 4, SfntName) = 0 then + FullFontName := ConvertFontName; +end; + +function TAggFontEngineFreetypeBase.GetNameInfo(FontName: string; + var FontFamily, FontSubFamily, UniqueFontID, FullFontName: string): boolean; +var + Face: PAggFreeTypeFace; + NameBuffer: TAggBytes; +begin + Result := False; + NameBuffer := TEncoding.UTF8.GetBytes(FontName + #0); + if FreeTypeNewFace(FLibrary, @NameBuffer[0], 0, Face) = 0 then + try + Result := GetNameInfo(Face, FontFamily, FontSubFamily, UniqueFontID, FullFontName); + finally + FreeTypeDoneFace(Face); + end; +end; + +function TAggFontEngineFreetypeBase.LoadFont(FontName: string; + FaceIndex: Cardinal; RenType: TAggGlyphRendering; FontMem: PAggFreeTypeByte = nil; + FontMemSize: Integer = 0): Boolean; +var + Idx: Integer; +begin + Result := False; + + if FontName = '' then + exit; + + FFaceName := TEncoding.UTF8.GetBytes(FontName + #0); + + if FLibraryInitialized then + begin + FLastError := 0; + + Idx := FindFace(FFaceName); + + if Idx >= 0 then + begin + FCurFace := FFaces[Idx]; + end + else + begin + if FNumFaces >= FMaxFaces then + begin + FreeTypeDoneFace(FFaces[0]); + + Move(FFaces[1], FFaces[0], (Length(FFaces) - 1) * SizeOF(PAggFreeTypeFace)); + Move(FFaceNames[1], FFaceNames[0], (Length(FFaceNames) - 1) * SizeOf(TAggBytes)); + SetLength(FFaces, Length(FFaces) - 1); + SetLength(FFaceNames, Length(FFaceNames) - 1); + + Dec(FNumFaces); + end; + + if (FontMem <> nil) and (FontMemSize > 0) then + FLastError := FreeTypeNewMemoryFace( + FLibrary, + PAggFreeTypeByte(FontMem), + FontMemSize, + FaceIndex, + FCurFace) + else + FLastError := FreeTypeNewFace( + FLibrary, + @FFaceName[0], + FaceIndex, + FCurFace); + + if FLastError = 0 then + begin + SetLength(FFaceNames, Length(FFaceNames) + 1); + SetLength(FFaceNames[Length(FFaceNames) - 1], Length(FFaceName)); + Move(FFaceName[0], FFaceNames[Length(FFaceNames) - 1][0], Length(FFaceName)); + + SetLength(FFaces, Length(FFaces) + 1); + FFaces[Length(FFaces) - 1] := FCurFace; + + Inc(FNumFaces); + end + else + begin + FCurFace := nil; + SetLength(FFaceName, 0); + end; + end; + + if FLastError = 0 then + begin + Result := True; + + case RenType of + grNativeMono: + FGlyphRendering := grNativeMono; + + grNativeGray8: + FGlyphRendering := grNativeGray8; + + grOutline: + if FreeTypeIsScalable(FCurFace) then + FGlyphRendering := grOutline + else + FGlyphRendering := grNativeGray8; + + grAggMono: + if FreeTypeIsScalable(FCurFace) then + FGlyphRendering := grAggMono + else + FGlyphRendering := grNativeMono; + + grAggGray8: + if FreeTypeIsScalable(FCurFace) then + FGlyphRendering := grAggGray8 + else + FGlyphRendering := grNativeGray8; + end; + + UpdateSignature; + end; + end; +end; + +function TAggFontEngineFreetypeBase.Attach(FileName: string): Boolean; +var + AnsiFileName: TAggBytes; +begin + Result := False; + + if FCurFace <> nil then + begin + AnsiFileName := TEncoding.UTF8.GetBytes(FileName); + FLastError := FreeTypeAttachFile(FCurFace, @AnsiFileName[0]); + + Result := FLastError = 0; + end; +end; + +function TAggFontEngineFreetypeBase.SetCharMap(Map: TAggFreeTypeEncoding): Boolean; +begin + Result := False; + + if FCurFace <> nil then + begin + FLastError := FreeTypeSelectCharmap(FCurFace, Map); + + if FLastError = 0 then + begin + FCharMap := Map; + + UpdateSignature; + + Result := True; + end; + end; +end; + +function TAggFontEngineFreetypeBase.SetHeight(Value: Double): Boolean; +begin + Result := False; + FHeight := Trunc(Value * 64.0); + + if FCurFace <> nil then + begin + UpdateCharSize; + + Result := True; + end; +end; + +function TAggFontEngineFreetypeBase.SetWidth(Value: Double): Boolean; +begin + Result := False; + FWidth := Trunc(Value * 64.0); + + if FCurFace <> nil then + begin + UpdateCharSize; + + Result := True; + end; +end; + +procedure TAggFontEngineFreetypeBase.SetHinting(Value: Boolean); +begin + FHinting := Value; + + if FCurFace <> nil then + UpdateSignature; +end; + +procedure TAggFontEngineFreetypeBase.SetFlipY(Flip: Boolean); +begin + FFlipY := Flip; + + if FCurFace <> nil then + UpdateSignature; +end; + +procedure TAggFontEngineFreetypeBase.SetTransform(Affine: TAggTransAffine); +begin + FAffine.AssignAll(Affine); + + if FCurFace <> nil then + UpdateSignature; +end; + +procedure TAggFontEngineFreetypeBase.SetGamma(F: TAggCustomVertexSource); +begin + FRasterizer.Gamma(F); +end; + +function TAggFontEngineFreetypeBase.GetLastError: Integer; +begin + Result := FLastError; +end; + +function TAggFontEngineFreetypeBase.GetResolution: Cardinal; +begin + Result := FResolution; +end; + +function TAggFontEngineFreetypeBase.GetName: string; +begin + Result := TEncoding.UTF8.GetString(FFaceName); +end; + +function TAggFontEngineFreetypeBase.GetNum_faces: Cardinal; +begin + if FCurFace <> nil then + Result := FCurFace.NumFaces + else + Result := 0; +end; + +function TAggFontEngineFreetypeBase.GetCharMap: TAggFreeTypeEncoding; +begin + Result := FCharMap; +end; + +function TAggFontEngineFreetypeBase.GetHeight: Double; +begin + Result := FHeight / 64.0; +end; + +function TAggFontEngineFreetypeBase.GetWidth: Double; +begin + Result := FWidth / 64.0; +end; + +function TAggFontEngineFreetypeBase.GetAscender: Double; +begin + if FCurFace <> nil then + Result := FCurFace.Ascender * GetHeight / FCurFace.UnitsPerEM + else + Result := 0.0; +end; + +function TAggFontEngineFreetypeBase.GetDefaultLineSpacing: Double; +begin + if FCurFace <> nil then + begin + Result := FCurFace.Height * GetHeight / FCurFace.UnitsPerEM; + end else + Result := 0.0; +end; + +function TAggFontEngineFreetypeBase.GetDescender: Double; +begin + if FCurFace <> nil then + Result := FCurFace.Descender * GetHeight / FCurFace.UnitsPerEM + else + Result := 0.0; +end; + +function TAggFontEngineFreetypeBase.GetFontSignature: TAggBytes; +begin + Result := FSignature; +end; + +function TAggFontEngineFreetypeBase.ChangeStamp: Integer; +begin + Result := FChangeStamp; +end; + +function TAggFontEngineFreetypeBase.PrepareGlyph(GlyphCode: Cardinal): Boolean; +var + Fl: Integer; + Bnd: TRectDouble; +begin + Result := False; + + FGlyphIndex := FreeTypeGetCharIndex(FCurFace, GlyphCode); + + if FHinting then + FLastError := FreeTypeLoadGlyph(FCurFace, FGlyphIndex, CAggFreeTypeLoadDefault) + else + FLastError := FreeTypeLoadGlyph(FCurFace, FGlyphIndex, CAggFreeTypeLoadNoHinting); + + if FLastError = 0 then + case FGlyphRendering of + grNativeMono: + begin + FLastError := FreeTypeRenderGlyph(FCurFace.Glyph, CAggFreeTypeRenderModeMono); + + if FLastError = 0 then + begin + if FFlipY then + Fl := -FCurFace.Glyph.BitmapTop + else + Fl := FCurFace.Glyph.BitmapTop; + + DecomposeFreeTypeBitmapMono(@FCurFace.Glyph.Bitmap, FCurFace.Glyph.BitmapLeft, Fl, FFlipY, FScanLineBin, FScanLinesBin); + + FBounds.X1 := FScanLinesBin.MinimumX; + FBounds.Y1 := FScanLinesBin.MinimumY; + FBounds.X2 := FScanLinesBin.MaximumX; + FBounds.Y2 := FScanLinesBin.MaximumY; + FDataSize := FScanLinesBin.ByteSize; + FDataType := gdMono; + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + Result := True; + end; + end; + + grNativeGray8: + begin + FLastError := FreeTypeRenderGlyph(FCurFace.Glyph, CAggFreeTypeRenderModeNormal); + + if FLastError = 0 then + begin + if FFlipY then + Fl := -FCurFace.Glyph.BitmapTop + else + Fl := FCurFace.Glyph.BitmapTop; + + DecomposeFreeTypeBitmapGray8(@FCurFace.Glyph.Bitmap, FCurFace.Glyph.BitmapLeft, Fl, FFlipY, FRasterizer, FScanLineAA, FScanLinesAA); + + FBounds.X1 := FScanLinesAA.MinimumX; + FBounds.Y1 := FScanLinesAA.MinimumY; + FBounds.X2 := FScanLinesAA.MaximumX; + FBounds.Y2 := FScanLinesAA.MaximumY; + FDataSize := FScanLinesAA.ByteSize; + FDataType := gdGray8; + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + Result := True; + end; + end; + + grOutline: + if FLastError = 0 then + if FFlag32 then + begin + FPath32.RemoveAll; + + if DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath32) then + begin + Bnd := FPath32.GetBoundingRect; + + FDataSize := FPath32.ByteSize; + FDataType := gdOutline; + FBounds.X1 := Floor(Bnd.X1); + FBounds.Y1 := Floor(Bnd.Y1); + FBounds.X2 := Ceil(Bnd.X2); + FBounds.Y2 := Ceil(Bnd.Y2); + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); + + Result := True; + end; + + end + else + begin + FPath16.RemoveAll; + + if DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath16) then + begin + Bnd := FPath16.GetBoundingRect; + + FDataSize := FPath16.ByteSize; + FDataType := gdOutline; + FBounds.X1 := Floor(Bnd.X1); + FBounds.Y1 := Floor(Bnd.Y1); + FBounds.X2 := Ceil(Bnd.X2); + FBounds.Y2 := Ceil(Bnd.Y2); + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); + + Result := True; + end; + end; + + grAggMono: + if FLastError = 0 then + begin + FRasterizer.Reset; + + if FFlag32 then + begin + FPath32.RemoveAll; + + DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath32); + + FRasterizer.AddPath(FCurves32); + end + else + begin + FPath16.RemoveAll; + + DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath16); + + FRasterizer.AddPath(FCurves16); + end; + + FScanLinesBin.Prepare(1); // Remove all + + RenderScanLines(FRasterizer, FScanLineBin, FScanLinesBin); + + FBounds.X1 := FScanLinesBin.MinimumX; + FBounds.Y1 := FScanLinesBin.MinimumY; + FBounds.X2 := FScanLinesBin.MaximumX; + FBounds.Y2 := FScanLinesBin.MaximumY; + FDataSize := FScanLinesBin.ByteSize; + FDataType := gdMono; + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); + + Result := True; + end; + + grAggGray8: + if FLastError = 0 then + begin + FRasterizer.Reset; + + if FFlag32 then + begin + FPath32.RemoveAll; + + DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath32); + + FRasterizer.AddPath(FCurves32); + + end + else + begin + FPath16.RemoveAll; + + DecomposeFreeTypeOutline(@FCurFace.Glyph.Outline, FFlipY, FAffine, FPath16); + + FRasterizer.AddPath(FCurves16); + end; + + FScanLinesAA.Prepare(1); // Remove all + + RenderScanLines(FRasterizer, FScanLineAA, FScanLinesAA); + + FBounds.X1 := FScanLinesAA.MinimumX; + FBounds.Y1 := FScanLinesAA.MinimumY; + FBounds.X2 := FScanLinesAA.MaximumX; + FBounds.Y2 := FScanLinesAA.MaximumY; + FDataSize := FScanLinesAA.ByteSize; + FDataType := gdGray8; + FAdvanceX := Int26p6ToDouble(FCurFace.Glyph.Advance.X); + FAdvanceY := Int26p6ToDouble(FCurFace.Glyph.Advance.Y); + + FAffine.Transform(FAffine, @FAdvanceX, @FAdvanceY); + + Result := True; + end; + end; +end; + +function TAggFontEngineFreetypeBase.GetGlyphIndex: Cardinal; +begin + Result := FGlyphIndex; +end; + +function TAggFontEngineFreetypeBase.GetDataSize: Cardinal; +begin + Result := FDataSize; +end; + +function TAggFontEngineFreetypeBase.GetDataType: TAggGlyphData; +begin + Result := FDataType; +end; + +function TAggFontEngineFreetypeBase.GetBounds: PRectInteger; +begin + Result := @FBounds; +end; + +function TAggFontEngineFreetypeBase.GetAdvanceX: Double; +begin + Result := FAdvanceX; +end; + +function TAggFontEngineFreetypeBase.GetAdvanceY: Double; +begin + Result := FAdvanceY; +end; + +procedure TAggFontEngineFreetypeBase.WriteGlyphTo(Data: PInt8u); +begin + if (Data <> nil) and (FDataSize <> 0) then + case FDataType of + gdMono: + FScanLinesBin.Serialize(Data); + + gdGray8: + FScanLinesAA.Serialize(Data); + + gdOutline: + if FFlag32 then + FPath32.Serialize(Data) + else + FPath16.Serialize(Data); + end; +end; + +function TAggFontEngineFreetypeBase.AddKerning(First, Second: Cardinal; + X, Y: PDouble): Boolean; +var + Delta : TAggFreeTypeVector; + Dx, Dy: Double; +begin + if (FCurFace <> nil) and (First <> 0) and (Second <> 0) and + FreeTypeHasKerning(FCurFace) then + begin + FreeTypeGetKerning(FCurFace, First, Second, CAggFreeTypeKerningDefault, @Delta); + + Dx := Int26p6ToDouble(Delta.X); + Dy := Int26p6ToDouble(Delta.Y); + + if (FGlyphRendering = grOutline) or + (FGlyphRendering = grAggMono) or + (FGlyphRendering = grAggGray8) then + FAffine.Transform2x2(FAffine, @Dx, @Dy); + + X^ := X^ + Dx; + Y^ := Y^ + Dy; + + Result := True; + + end + else + Result := False; +end; + +function TAggFontEngineFreetypeBase.GetFlag32; +begin + Result := FFlag32; +end; + +procedure TAggFontEngineFreetypeBase.UpdateCharSize; +begin + if FCurFace <> nil then + begin + if FResolution <> 0 then + FreeTypeSetCharSize(FCurFace, FWidth, // char_width in 1/64th of points + FHeight, // char_height in 1/64th of points + FResolution, // horizontal device resolution + FResolution) // vertical device resolution + else + FreeTypeSetPixelSizes(FCurFace, FWidth shr 6, // pixel_width + FHeight shr 6); // pixel_height + + UpdateSignature; + end; +end; + +procedure TAggFontEngineFreetypeBase.UpdateSignature; +var + GammaHash, I: Cardinal; + GammaTable: array [0..CAggAntiAliasingNum - 1] of Int8u; + MatrixData: TAggParallelogram; + Str: string; +begin + if (FCurFace <> nil) and (Length(FFaceName) <> 0) then + begin + + GammaHash := 0; + + if (FGlyphRendering = grNativeGray8) + or (FGlyphRendering = grAggMono) + or (FGlyphRendering = grAggGray8) then + begin + for I := 0 to CAggAntiAliasingNum - 1 do + GammaTable[I] := FRasterizer.ApplyGamma(I); + + GammaHash := Calc_crc32(@GammaTable, SizeOf(GammaTable)); + end; + + Str := ''; + I := 0; + while (I < Length(FFaceName)) and (FFaceName[I] <> 0) do + begin + Str := Str + Char(FFaceName[I]); + Inc(I); + end; + + Str := Str + Format(',%d%d%d%d,%d,%d,%d:%dx%d,%d,%d,%x', [ + FCharMap[0], FCharMap[1], FCharMap[2], FCharMap[3], + FFaceIndex, Integer(FGlyphRendering), FResolution, FHeight, + FWidth, Integer(FHinting), Integer(FFlipY), GammaHash]); + + if (FGlyphRendering = grOutline) or (FGlyphRendering = grAggMono) or (FGlyphRendering = grAggGray8) then + begin + FAffine.StoreTo(@MatrixData); + + Str := Str + Format(',%x,%x,%x,%x,%x,%x', [ + DoubleToPlainFixedPoint(MatrixData[0]), + DoubleToPlainFixedPoint(MatrixData[1]), + DoubleToPlainFixedPoint(MatrixData[2]), + DoubleToPlainFixedPoint(MatrixData[3]), + DoubleToPlainFixedPoint(MatrixData[4]), + DoubleToPlainFixedPoint(MatrixData[5])]); + end; + + FSignature := TEncoding.UTF8.GetBytes(Str + #0); + + Inc(FChangeStamp); + end; +end; + +function TAggFontEngineFreetypeBase.FindFace(Name: TAggBytes): Integer; +var + I: Cardinal; +begin + Result := -1; + + I := 0; + + while I < Length(FFaceNames) do + begin + if (Length(Name) = Length(FFaceNames[I])) and CompareMem(@Name[0], @FFaceNames[I][0], Length(Name)) then + begin + Result := I; + Exit; + end; + + Inc(I); + end; +end; + +{ TAggFontEngineFreetypeInt16 } + +constructor TAggFontEngineFreetypeInt16.Create(MaxFaces: Cardinal = 32); +begin + inherited Create(False, MaxFaces); +end; + +{ TAggFontEngineFreetypeInt32 } + +constructor TAggFontEngineFreetypeInt32.Create(MaxFaces: Cardinal = 32); +begin + inherited Create(True, MaxFaces); +end; + +end. diff --git a/Source/AggFontFreetypeLib.pas b/Source/AggFontFreeTypeLib.pas old mode 100644 new mode 100755 similarity index 91% rename from Source/AggFontFreetypeLib.pas rename to Source/AggFontFreeTypeLib.pas index 0608aa6..9b8af56 --- a/Source/AggFontFreetypeLib.pas +++ b/Source/AggFontFreeTypeLib.pas @@ -32,6 +32,8 @@ interface {$I AggCompiler.inc} +{$packrecords c} + uses AggBasics; @@ -45,18 +47,14 @@ interface {$ENDIF} {$IFDEF AGG_LINUX } - CAggFreeTypeLibrary = 'freetype.so'; + CAggFreeTypeLibrary = 'libfreetype.so'; CAggFreeTypePrefix = ''; {$ENDIF} {$IFDEF AGG_MACOSX } - CAggFreeTypeLibrary = 'libfreetype'; - CAggFreeTypePrefix = ''; -{$ENDIF} - -{$IFDEF MACOS} CAggFreeTypeLibrary = 'libfreetype.dylib'; - CAggFreeTypePrefix = '_'; + CAggFreeTypePrefix = ''; + {$linklib freetype} {$ENDIF} CAggFreeTypeCurveTagOn = 1; @@ -94,10 +92,16 @@ interface TAggFreeTypeInt = Longint; TAggFreeTypeUInt = Longword; TAggFreeTypeInt32 = Longint; + {$if defined(cpu64) and not(defined(win64) and defined(cpux86_64))} + TAggFreeTypeLong = int64; + TAggFreeTypeULong = qword; + TAggFreeTypePos = int64; + {$ELSE} TAggFreeTypeLong = Longint; TAggFreeTypeULong = Longword; - TAggFreeTypeFixed = Longint; TAggFreeTypePos = Longint; + {$ENDIF} + TAggFreeTypeFixed = TAggFreeTypeLong; TAggFreeTypeError = Longint; TAggFreeTypeFixed26Dot6 = Longint; @@ -108,11 +112,11 @@ interface PPAggFreeTypeLibrary = ^PAggFreeTypeLibrary; PAggFreeTypeLibrary = ^TAggFreeTypeLibrary; - TAggFreeTypeLibrary = packed record + TAggFreeTypeLibrary = record end; PAggFreeTypeSubglyph = ^TAggFreeTypeSubglyph; - TAggFreeTypeSubglyph = packed record // TODO + TAggFreeTypeSubglyph = record // TODO end; TAggFreeTypeBitmapSize = record @@ -126,23 +130,23 @@ TAggFreeTypeBitmapSize = record TAggFreeTypeGenericFinalizer = procedure(AnObject: Pointer); cdecl; - TAggFreeTypeGeneric = packed record + TAggFreeTypeGeneric = record Data: Pointer; Finalizer: TAggFreeTypeGenericFinalizer; end; PAggFreeTypeBBox = ^TAggFreeTypeBBox; - TAggFreeTypeBBox = packed record + TAggFreeTypeBBox = record XMin, YMin, XMax, YMax: TAggFreeTypePos; end; PAggFreeTypeVector = ^TAggFreeTypeVector; - TAggFreeTypeVector = packed record + TAggFreeTypeVector = record X, Y: TAggFreeTypePos; end; PAggFreeTypeBitmap = ^TAggFreeTypeBitmap; - TAggFreeTypeBitmap = packed record + TAggFreeTypeBitmap = record Rows, Width, Pitch: TAggFreeTypeInt; Buffer: Pointer; @@ -154,7 +158,7 @@ TAggFreeTypeBitmapSize = record end; PAggFreeTypeOutline = ^TAggFreeTypeOutline; - TAggFreeTypeOutline = packed record + TAggFreeTypeOutline = record NumContours, NumPoints: TAggFreeTypeShort; Points: PAggFreeTypeVector; @@ -164,7 +168,7 @@ TAggFreeTypeBitmapSize = record Flags: TAggFreeTypeInt; end; - TAggFreeTypeGlyphMetrics = packed record + TAggFreeTypeGlyphMetrics = record Width, Height, HoriBearingX, HoriBearingY, HoriAdvance: TAggFreeTypePos; VertBearingX, VertBearingY, VertAdvance: TAggFreeTypePos; end; @@ -173,7 +177,7 @@ TAggFreeTypeBitmapSize = record PAggFreeTypeFace = ^TAggFreeTypeFace; PAggFreeTypeGlyphSlot = ^TAggFreeTypeGlyphSlot; - TAggFreeTypeGlyphSlot = packed record + TAggFreeTypeGlyphSlot = record ALibrary: PAggFreeTypeLibrary; Face: PAggFreeTypeFace; @@ -216,7 +220,7 @@ TAggFreeTypeSize = record // internal : FT_Size_Internal; end; - TAggFreeTypeFace = packed record + TAggFreeTypeFace = record NumFaces, FaceIndex, FaceFlags, StyleFlags, NumGlyphs: TAggFreeTypeLong; FamilyName, StyleName: PAggFreeTypeByte; @@ -241,7 +245,7 @@ TAggFreeTypeSize = record Charmap: PAggFreeTypeCharmap; end; - TAggFreeTypeCharmap = packed record + TAggFreeTypeCharmap = record Face: PAggFreeTypeFace; Encoding: TAggFreeTypeEncoding; @@ -249,7 +253,7 @@ TAggFreeTypeSize = record end; PAggFreeTypeSfntName = ^TAggFreeTypeSfntName; - TAggFreeTypeSfntName = packed record + TAggFreeTypeSfntName = record PlatformID: TAggFreeTypeUShort; EncodingID: TAggFreeTypeUShort; LanguageID: TAggFreeTypeUShort; diff --git a/Source/AggFontWin32TrueType.pas b/Source/AggFontWin32TrueType.pas index 4c29681..d064432 100644 --- a/Source/AggFontWin32TrueType.pas +++ b/Source/AggFontWin32TrueType.pas @@ -34,7 +34,9 @@ interface {$I AggCompiler.inc} uses - Windows, SysUtils, Math, + Windows, + SysUtils, + Math, AggBasics, AggArray, AggBitsetIterator, diff --git a/Source/AggGammaFunctions.pas b/Source/AggGammaFunctions.pas old mode 100644 new mode 100755 diff --git a/Source/AggGammaLUT.pas b/Source/AggGammaLUT.pas old mode 100644 new mode 100755 diff --git a/Source/AggGlyphRasterBin.pas b/Source/AggGlyphRasterBin.pas old mode 100644 new mode 100755 diff --git a/Source/AggGradientLut.pas b/Source/AggGradientLut.pas old mode 100644 new mode 100755 diff --git a/Source/AggGsvText.pas b/Source/AggGsvText.pas old mode 100644 new mode 100755 diff --git a/Source/AggImageFilters.pas b/Source/AggImageFilters.pas old mode 100644 new mode 100755 diff --git a/Source/AggLineAABasics.pas b/Source/AggLineAABasics.pas old mode 100644 new mode 100755 diff --git a/Source/AggMath.pas b/Source/AggMath.pas old mode 100644 new mode 100755 diff --git a/Source/AggMathStroke.pas b/Source/AggMathStroke.pas old mode 100644 new mode 100755 diff --git a/Source/AggPathStorage.pas b/Source/AggPathStorage.pas old mode 100644 new mode 100755 diff --git a/Source/AggPathStorageInteger.pas b/Source/AggPathStorageInteger.pas old mode 100644 new mode 100755 diff --git a/Source/AggPatternFiltersRgba.pas b/Source/AggPatternFiltersRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormat.pas b/Source/AggPixelFormat.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatAbgr32.inc b/Source/AggPixelFormatAbgr32.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatAbgr32Pre.inc b/Source/AggPixelFormatAbgr32Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatAlpha32.inc b/Source/AggPixelFormatAlpha32.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatAlphaMaskAdaptor.pas b/Source/AggPixelFormatAlphaMaskAdaptor.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatArgb32.inc b/Source/AggPixelFormatArgb32.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatArgb32Pre.inc b/Source/AggPixelFormatArgb32Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatBgr24.inc b/Source/AggPixelFormatBgr24.inc old mode 100644 new mode 100755 index 643903a..98709ac --- a/Source/AggPixelFormatBgr24.inc +++ b/Source/AggPixelFormatBgr24.inc @@ -2,8 +2,7 @@ // AggPas 2.4 RM3 pixel format definition file // -procedure BlendPixBgr(P: PAggOrderBgr; Cr, Cg, Cb, Alpha: Integer; - Cover: Cardinal = 0); +procedure BlendPixBgr(P: PAggOrderBgr; Cr, Cg, Cb, Alpha: Integer; Cover: Cardinal = 0); {$IFDEF PUREPASCAL} begin P^.R := P^.R + ((Cr - P^.R) * Alpha) shr CAggBaseShift; diff --git a/Source/AggPixelFormatBgr24Gamma.inc b/Source/AggPixelFormatBgr24Gamma.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatBgr24Pre.inc b/Source/AggPixelFormatBgr24Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatBgra32.inc b/Source/AggPixelFormatBgra32.inc old mode 100644 new mode 100755 index b2f5892..77d3af1 --- a/Source/AggPixelFormatBgra32.inc +++ b/Source/AggPixelFormatBgra32.inc @@ -2,8 +2,7 @@ // AggPas 2.4 RM3 pixel format definition file // -procedure BlendPixBgra(P: PAggOrderBgra; Cr, Cg, Cb, Alpha: Integer; - Cover: Cardinal = 0); +procedure BlendPixBgra(P: PAggOrderBgra; Cr, Cg, Cb, Alpha: Integer; Cover: Cardinal = 0); {$IFDEF PUREPASCAL} begin P^.R := ((Cr - P^.R) * Alpha + (P^.R shl CAggBaseShift)) shr CAggBaseShift; diff --git a/Source/AggPixelFormatBgra32Pre.inc b/Source/AggPixelFormatBgra32Pre.inc old mode 100644 new mode 100755 index 2aef223..76caab8 --- a/Source/AggPixelFormatBgra32Pre.inc +++ b/Source/AggPixelFormatBgra32Pre.inc @@ -2,8 +2,7 @@ // AggPas 2.4 RM3 pixel format definition file // -procedure BlendPixBgraPre(P: PAggOrderBgra; Cr, Cg, Cb, Alpha: Cardinal); - overload; +procedure BlendPixBgraPre(P: PAggOrderBgra; Cr, Cg, Cb, Alpha: Cardinal); overload; {$IFDEF PUREPASCAL} begin Alpha := CAggBaseMask - Alpha; @@ -11,8 +10,7 @@ begin P^.R := Int8u(((P^.R * Alpha) shr CAggBaseShift) + Cr); P^.G := Int8u(((P^.G * Alpha) shr CAggBaseShift) + Cg); P^.B := Int8u(((P^.B * Alpha) shr CAggBaseShift) + Cb); - P^.A := Int8u(CAggBaseMask - ((Alpha * (CAggBaseMask - P^.A)) shr - CAggBaseShift)); + P^.A := Int8u(CAggBaseMask - ((Alpha * (CAggBaseMask - P^.A)) shr CAggBaseShift)); {$ELSE} asm {$IFDEF AGG_CPU_386} @@ -109,8 +107,7 @@ begin P^.R := Int8u((P^.R * Alpha + Cr * Cover) shr CAggBaseShift); P^.G := Int8u((P^.G * Alpha + Cg * Cover) shr CAggBaseShift); P^.B := Int8u((P^.B * Alpha + Cb * Cover) shr CAggBaseShift); - P^.A := Int8u(CAggBaseMask - ((Alpha * (CAggBaseMask - P^.A)) shr - CAggBaseShift)); + P^.A := Int8u(CAggBaseMask - ((Alpha * (CAggBaseMask - P^.A)) shr CAggBaseShift)); end; procedure CopyOrBlendPixBgraPre(P: PAggOrderBgra; Cr, Cg, Cb, diff --git a/Source/AggPixelFormatCubl32.inc b/Source/AggPixelFormatCubl32.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatGray.pas b/Source/AggPixelFormatGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatGray8.inc b/Source/AggPixelFormatGray8.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatGray8Pre.inc b/Source/AggPixelFormatGray8Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb.pas b/Source/AggPixelFormatRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb24.inc b/Source/AggPixelFormatRgb24.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb24Gamma.inc b/Source/AggPixelFormatRgb24Gamma.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb24Pre.inc b/Source/AggPixelFormatRgb24Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb555.inc b/Source/AggPixelFormatRgb555.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb555Gamma.inc b/Source/AggPixelFormatRgb555Gamma.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb555Pre.inc b/Source/AggPixelFormatRgb555Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb565.inc b/Source/AggPixelFormatRgb565.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb565Gamma.inc b/Source/AggPixelFormatRgb565Gamma.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgb565Pre.inc b/Source/AggPixelFormatRgb565Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgbPacked.pas b/Source/AggPixelFormatRgbPacked.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgba.pas b/Source/AggPixelFormatRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatRgba32.inc b/Source/AggPixelFormatRgba32.inc old mode 100644 new mode 100755 index 3ef2d06..e7c056d --- a/Source/AggPixelFormatRgba32.inc +++ b/Source/AggPixelFormatRgba32.inc @@ -2,8 +2,7 @@ // AggPas 2.4 RM3 pixel format definition file // -procedure BlendPixRgba(P: PAggOrderRgba; Cr, Cg, Cb, Alpha: Integer; - Cover: Cardinal = 0); +procedure BlendPixRgba(P: PAggOrderRgba; Cr, Cg, Cb, Alpha: Integer; Cover: Cardinal = 0); {$IFDEF PUREPASCAL} begin P^.R := ((Cr - P^.R) * Alpha + (P^.R shl CAggBaseShift)) shr CAggBaseShift; diff --git a/Source/AggPixelFormatRgba32Pre.inc b/Source/AggPixelFormatRgba32Pre.inc old mode 100644 new mode 100755 diff --git a/Source/AggPixelFormatTransposer.pas b/Source/AggPixelFormatTransposer.pas old mode 100644 new mode 100755 diff --git a/Source/AggQuadratureOscillator.pas b/Source/AggQuadratureOscillator.pas old mode 100644 new mode 100755 diff --git a/Source/AggRasterizerCellsAA.pas b/Source/AggRasterizerCellsAA.pas old mode 100644 new mode 100755 diff --git a/Source/AggRasterizerCompoundAA.pas b/Source/AggRasterizerCompoundAA.pas old mode 100644 new mode 100755 index 2c408b9..fe2e28d --- a/Source/AggRasterizerCompoundAA.pas +++ b/Source/AggRasterizerCompoundAA.pas @@ -30,8 +30,8 @@ interface AggBasics, AggArray, AggRasterizerCellsAA, - AggRasterizerScanline, - AggRasterizerScanlineClip, + AggRasterizerScanLine, + AggRasterizerScanLineClip, AggVertexSource, AggScanLine; diff --git a/Source/AggRasterizerOutline.pas b/Source/AggRasterizerOutline.pas old mode 100644 new mode 100755 diff --git a/Source/AggRasterizerOutlineAA.pas b/Source/AggRasterizerOutlineAA.pas old mode 100644 new mode 100755 diff --git a/Source/AggRasterizerScanLine.pas b/Source/AggRasterizerScanLine.pas old mode 100644 new mode 100755 diff --git a/Source/AggRasterizerScanLineAA.pas b/Source/AggRasterizerScanLineAA.pas old mode 100644 new mode 100755 index 5b89cc9..8cdf74a --- a/Source/AggRasterizerScanLineAA.pas +++ b/Source/AggRasterizerScanLineAA.pas @@ -223,6 +223,7 @@ TAggRasterizerScanLineAA = class(TAggRasterizerScanLine) procedure Reset; override; procedure AutoClose(Flag: Boolean); + procedure SetClipping (Value : Boolean); procedure SetClipBox(X1, Y1, X2, Y2: Double); override; procedure SetClipBox(Rect: TRectDouble); override; @@ -1076,6 +1077,11 @@ procedure TAggRasterizerScanLineAA.Reset; FStatus := siStatusInitial; end; +procedure TAggRasterizerScanLineAA.SetClipping (Value : Boolean); +begin + FClipping := Value; +end; + procedure TAggRasterizerScanLineAA.SetClipBox(X1, Y1, X2, Y2: Double); begin Reset; diff --git a/Source/AggRasterizerScanlineClip.pas b/Source/AggRasterizerScanLineClip.pas old mode 100644 new mode 100755 similarity index 95% rename from Source/AggRasterizerScanlineClip.pas rename to Source/AggRasterizerScanLineClip.pas index 3bfcc0f..ecbf3d6 --- a/Source/AggRasterizerScanlineClip.pas +++ b/Source/AggRasterizerScanLineClip.pas @@ -1,4 +1,4 @@ -unit AggRasterizerScanlineClip; +unit AggRasterizerScanLineClip; //////////////////////////////////////////////////////////////////////////////// // // diff --git a/Source/AggRenderScanlines.pas b/Source/AggRenderScanLines.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggRenderScanlines.pas rename to Source/AggRenderScanLines.pas diff --git a/Source/AggRendererBase.pas b/Source/AggRendererBase.pas old mode 100644 new mode 100755 index 7dabaf0..d2f6456 --- a/Source/AggRendererBase.pas +++ b/Source/AggRendererBase.pas @@ -77,6 +77,9 @@ TAggRendererBase = class procedure Clear(C: PAggColor); overload; procedure Clear(C: TAggRgba8); overload; + procedure Fill(C: PAggColor); overload; + procedure Fill(C: TAggRgba8); overload; + procedure CopyPixel(X, Y: Integer; C: PAggColor); virtual; procedure BlendPixel(X, Y: Integer; C: PAggColor; Cover: Int8u); virtual; function Pixel(X, Y: Integer): TAggColor; virtual; @@ -337,8 +340,7 @@ procedure TAggRendererBase.Clear(C: PAggColor); begin if (Width > 0) and (Height > 0) then for Y := 0 to GetHeight - 1 do - FPixelFormatProcessor.CopyHorizontalLine(FPixelFormatProcessor, 0, Y, - Width, C); + FPixelFormatProcessor.CopyHorizontalLine(FPixelFormatProcessor, 0, Y, Width, C); end; procedure TAggRendererBase.Clear(C: TAggRgba8); @@ -349,8 +351,27 @@ procedure TAggRendererBase.Clear(C: TAggRgba8); AggColor.Rgba8 := C; if (Width > 0) and (Height > 0) then for Y := 0 to Height - 1 do - FPixelFormatProcessor.CopyHorizontalLine(FPixelFormatProcessor, 0, Y, - Width, @AggColor); + FPixelFormatProcessor.CopyHorizontalLine(FPixelFormatProcessor, 0, Y, Width, @AggColor); +end; + +procedure TAggRendererBase.Fill(C: PAggColor); +var + Y: Cardinal; +begin + if (Width > 0) and (Height > 0) then + for Y := 0 to GetHeight - 1 do + FPixelFormatProcessor.BlendHorizontalLine(FPixelFormatProcessor, 0, Y, Width, C, CAggCoverMask); +end; + +procedure TAggRendererBase.Fill(C: TAggRgba8); +var + AggColor: TAggColor; + Y: Cardinal; +begin + AggColor.Rgba8 := C; + if (Width > 0) and (Height > 0) then + for Y := 0 to Height - 1 do + FPixelFormatProcessor.BlendHorizontalLine(FPixelFormatProcessor, 0, Y, Width, @AggColor, CAggCoverMask); end; procedure TAggRendererBase.CopyPixel(X, Y: Integer; C: PAggColor); diff --git a/Source/AggRendererMarkers.pas b/Source/AggRendererMarkers.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererMultiClip.pas b/Source/AggRendererMultiClip.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererOutlineAA.pas b/Source/AggRendererOutlineAA.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererOutlineImage.pas b/Source/AggRendererOutlineImage.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererPrimitives.pas b/Source/AggRendererPrimitives.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererRasterText.pas b/Source/AggRendererRasterText.pas old mode 100644 new mode 100755 diff --git a/Source/AggRendererScanLine.pas b/Source/AggRendererScanLine.pas old mode 100644 new mode 100755 diff --git a/Source/AggRenderingBuffer.pas b/Source/AggRenderingBuffer.pas old mode 100644 new mode 100755 index 298d840..bcf8059 --- a/Source/AggRenderingBuffer.pas +++ b/Source/AggRenderingBuffer.pas @@ -58,13 +58,11 @@ TAggRenderingBuffer = class FHeight: Cardinal; // Height in pixels function GetStrideAbs: Cardinal; public - constructor Create; overload; - constructor Create(ABuffer: PInt8u; AWidth, AHeight: Cardinal; - AStride: Integer); overload; + constructor Create(); overload; + constructor Create(ABuffer: PInt8u; AWidth, AHeight: Cardinal; AStride: Integer); overload; destructor Destroy; override; - procedure Attach(ABuffer: PInt8u; AWidth, AHeight: Cardinal; - AStride: Integer); + procedure Attach(ABuffer: PInt8u; AWidth, AHeight: Cardinal; AStride: Integer); function RowXY(X, Y: Integer; Len: Cardinal): PInt8u; virtual; function Row(Y: Cardinal): PInt8u; virtual; @@ -109,7 +107,7 @@ procedure TAggSpanData.Initialize(X: Integer; Len: Byte; Ptr: PInt8u); { TAggRenderingBuffer } -constructor TAggRenderingBuffer.Create; +constructor TAggRenderingBuffer.Create(); begin FBuffer := nil; FRows := nil; @@ -121,8 +119,7 @@ constructor TAggRenderingBuffer.Create; inherited; end; -constructor TAggRenderingBuffer.Create(ABuffer: PInt8u; - AWidth, AHeight: Cardinal; AStride: Integer); +constructor TAggRenderingBuffer.Create(ABuffer: PInt8u; AWidth, AHeight: Cardinal; AStride: Integer); begin Create; Attach(ABuffer, AWidth, AHeight, AStride); @@ -134,8 +131,7 @@ destructor TAggRenderingBuffer.Destroy; inherited; end; -procedure TAggRenderingBuffer.Attach(ABuffer: PInt8u; AWidth, AHeight: Cardinal; - AStride: Integer); +procedure TAggRenderingBuffer.Attach(ABuffer: PInt8u; AWidth, AHeight: Cardinal; AStride: Integer); var RowsPointer: PPInt8u; RowPointer: PInt8u; diff --git a/Source/AggRenderingBufferDynaRow.pas b/Source/AggRenderingBufferDynaRow.pas old mode 100644 new mode 100755 diff --git a/Source/AggRoundedRect.pas b/Source/AggRoundedRect.pas old mode 100644 new mode 100755 diff --git a/Source/AggScanline.pas b/Source/AggScanLine.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanline.pas rename to Source/AggScanLine.pas diff --git a/Source/AggScanlineBin.pas b/Source/AggScanLineBin.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanlineBin.pas rename to Source/AggScanLineBin.pas diff --git a/Source/AggScanlineBooleanAlgebra.pas b/Source/AggScanLineBooleanAlgebra.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanlineBooleanAlgebra.pas rename to Source/AggScanLineBooleanAlgebra.pas diff --git a/Source/AggScanlinePacked.pas b/Source/AggScanLinePacked.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanlinePacked.pas rename to Source/AggScanLinePacked.pas diff --git a/Source/AggScanlineStorageAA.pas b/Source/AggScanLineStorageAA.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanlineStorageAA.pas rename to Source/AggScanLineStorageAA.pas diff --git a/Source/AggScanlineStorageBin.pas b/Source/AggScanLineStorageBin.pas old mode 100644 new mode 100755 similarity index 100% rename from Source/AggScanlineStorageBin.pas rename to Source/AggScanLineStorageBin.pas diff --git a/Source/AggScanlineUnpacked.pas b/Source/AggScanLineUnpacked.pas old mode 100644 new mode 100755 similarity index 96% rename from Source/AggScanlineUnpacked.pas rename to Source/AggScanLineUnpacked.pas index a7ddd55..299b3bb --- a/Source/AggScanlineUnpacked.pas +++ b/Source/AggScanLineUnpacked.pas @@ -1,4 +1,4 @@ -unit AggScanlineUnpacked; +unit AggScanLineUnpacked; //////////////////////////////////////////////////////////////////////////////// // // diff --git a/Source/AggShortenPath.pas b/Source/AggShortenPath.pas old mode 100644 new mode 100755 diff --git a/Source/AggSimulEq.pas b/Source/AggSimulEq.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanAllocator.pas b/Source/AggSpanAllocator.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanConverter.pas b/Source/AggSpanConverter.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGenerator.pas b/Source/AggSpanGenerator.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGouraud.pas b/Source/AggSpanGouraud.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGouraudGray.pas b/Source/AggSpanGouraudGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGouraudRgba.pas b/Source/AggSpanGouraudRgba.pas old mode 100644 new mode 100755 index 8250e1c..2abf7c6 --- a/Source/AggSpanGouraudRgba.pas +++ b/Source/AggSpanGouraudRgba.pas @@ -186,7 +186,7 @@ function TAggSpanGouraudRgba.Generate(X, Y: Integer; Len: Cardinal): PAggColor; Lim = AggColor.CAggBaseMask; var Pc1, Pc2, T: PAggRgbaCalc; - Nlen, Start, Vr, Vg, Vb, Va: Integer; + Nlen, Start: Integer; R, G, B, A: TAggDdaLineInterpolator; Span: PAggColor; begin @@ -313,7 +313,7 @@ procedure TAggSpanGouraudRgba.Generate(Span: PAggColor; X, Y: Integer; Lim = AggColor.CAggBaseMask; var Pc1, Pc2, T: PAggRgbaCalc; - Nlen, Start, Vr, Vg, Vb, Va: Integer; + Nlen, Start: Integer; R, G, B, A: TAggDdaLineInterpolator; begin FRgba1.Calc(Y); // (FRgba1.FDelta.Y > 2) ? FRgba1.F1.Y : y); diff --git a/Source/AggSpanGradient.pas b/Source/AggSpanGradient.pas old mode 100644 new mode 100755 index 3705350..793ed6f --- a/Source/AggSpanGradient.pas +++ b/Source/AggSpanGradient.pas @@ -443,7 +443,8 @@ function TAggGradientRadialFocus.Calculate(X, Y, D: Integer): Integer; Solution.Y := Solution.Y - FFocus.Y; IntToFocus := Sqr(Solution.X) + Sqr(Solution.Y); - CurToFocus := Sqr(X - FFocus.X) + Sqr(Y - FFocus.Y); + // Bve convert to float to prevent integer overflow + CurToFocus := Sqr(1.0 * X - FFocus.X) + Sqr(1.0 * Y - FFocus.Y); Result := Trunc(Sqrt(CurToFocus / IntToFocus) * FRadius); end; diff --git a/Source/AggSpanGradientAlpha.pas b/Source/AggSpanGradientAlpha.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGradientContour.pas b/Source/AggSpanGradientContour.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanGradientImage.pas b/Source/AggSpanGradientImage.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageFilter.pas b/Source/AggSpanImageFilter.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageFilterGray.pas b/Source/AggSpanImageFilterGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageFilterRgb.pas b/Source/AggSpanImageFilterRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageFilterRgba.pas b/Source/AggSpanImageFilterRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageResample.pas b/Source/AggSpanImageResample.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageResampleGray.pas b/Source/AggSpanImageResampleGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageResampleRgb.pas b/Source/AggSpanImageResampleRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanImageResampleRgba.pas b/Source/AggSpanImageResampleRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanInterpolatorAdaptor.pas b/Source/AggSpanInterpolatorAdaptor.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanInterpolatorLinear.pas b/Source/AggSpanInterpolatorLinear.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanInterpolatorPerspective.pas b/Source/AggSpanInterpolatorPerspective.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanInterpolatorTrans.pas b/Source/AggSpanInterpolatorTrans.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPattern.pas b/Source/AggSpanPattern.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternFilterGray.pas b/Source/AggSpanPatternFilterGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternFilterRgb.pas b/Source/AggSpanPatternFilterRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternFilterRgba.pas b/Source/AggSpanPatternFilterRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternResampleGray.pas b/Source/AggSpanPatternResampleGray.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternResampleRgb.pas b/Source/AggSpanPatternResampleRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternResampleRgba.pas b/Source/AggSpanPatternResampleRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternRgb.pas b/Source/AggSpanPatternRgb.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanPatternRgba.pas b/Source/AggSpanPatternRgba.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanSolid.pas b/Source/AggSpanSolid.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpanSubdivAdaptor.pas b/Source/AggSpanSubdivAdaptor.pas old mode 100644 new mode 100755 diff --git a/Source/AggSpiral.pas b/Source/AggSpiral.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransAffine.pas b/Source/AggTransAffine.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransBilinear.pas b/Source/AggTransBilinear.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransDoublePath.pas b/Source/AggTransDoublePath.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransPerspective.pas b/Source/AggTransPerspective.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransSinglePath.pas b/Source/AggTransSinglePath.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransViewport.pas b/Source/AggTransViewport.pas old mode 100644 new mode 100755 diff --git a/Source/AggTransWarpMagnifier.pas b/Source/AggTransWarpMagnifier.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenBSpline.pas b/Source/AggVcgenBSpline.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenContour.pas b/Source/AggVcgenContour.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenDash.pas b/Source/AggVcgenDash.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenMarkersTerm.pas b/Source/AggVcgenMarkersTerm.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenSmoothPoly1.pas b/Source/AggVcgenSmoothPoly1.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenStroke.pas b/Source/AggVcgenStroke.pas old mode 100644 new mode 100755 diff --git a/Source/AggVcgenVertexSequence.pas b/Source/AggVcgenVertexSequence.pas old mode 100644 new mode 100755 diff --git a/Source/AggVertexSequence.pas b/Source/AggVertexSequence.pas old mode 100644 new mode 100755 diff --git a/Source/AggVertexSource.pas b/Source/AggVertexSource.pas old mode 100644 new mode 100755 diff --git a/Source/AggVpGen.pas b/Source/AggVpGen.pas old mode 100644 new mode 100755 diff --git a/Source/AggVpGenClipPolygon.pas b/Source/AggVpGenClipPolygon.pas old mode 100644 new mode 100755 diff --git a/Source/AggVpGenClipPolyline.pas b/Source/AggVpGenClipPolyline.pas old mode 100644 new mode 100755 diff --git a/Source/AggVpGenSegmentator.pas b/Source/AggVpGenSegmentator.pas old mode 100644 new mode 100755 diff --git a/Source/Platform/linux/AggPlatformSupport.pas b/Source/Platform/linux/AggPlatformSupport.pas index 9aa1cd6..7612c0b 100644 --- a/Source/Platform/linux/AggPlatformSupport.pas +++ b/Source/Platform/linux/AggPlatformSupport.pas @@ -47,12 +47,18 @@ //////////////////////////////////////////////////////////////////////////////// interface - +{$linklib c} {$I AggCompiler.inc} {$I- } uses - X, Xlib, Xutil, Xatom, Keysym, Libc, CTypes, SysUtils, + X, + Xlib, + Xutil, + Xatom, + Keysym, + CTypes, + SysUtils, AggBasics, AggControl, AggRenderingBuffer, @@ -61,14 +67,30 @@ interface AggColorConversion, AggFileUtils; +const + clib = 'c'; + CLOCKS_PER_SEC = 1000000; +type + clock_t = clong; + +function clock():clock_t;cdecl;external clib name 'clock'; + +const + xFalse = 0; + xTrue = 1; + type // ----------------------------------------------------------------------- // These are flags used in method init. Not all of them are // applicable on different platforms, for example the win32_api // cannot use a hardware buffer (window_hw_buffer). // The implementation should simply ignore unsupported flags. - TWindowFlag = (wfResize, wfHardwareBuffer, wfKeepAspectRatio, - wfProcessAllKeys) + TWindowFlag = ( + wfResize, + wfHardwareBuffer, + wfKeepAspectRatio, + wfProcessAllKeys + ); TWindowFlags = set of TWindowFlag; // ----------------------------------------------------------------------- @@ -116,10 +138,10 @@ interface pfRgba64, // R-G-B-A, 16 bits byte per color component pfArgb64, // A-R-G-B, native MAC format pfAbgr64, // A-B-G-R, one byte per color component - pfBgra64, // B-G-R-A, native win32 BMP format + pfBgra64 // B-G-R-A, native win32 BMP format ); -const +type // -------------------------------------------------------------input_flag_e // Mouse and keyboard flags. They can be different on different platforms // and the ways they are obtained are also different. But in any case @@ -135,10 +157,13 @@ interface // probably supported on different platforms. Even the mouse_right flag // is restricted because Mac's mice have only one button, but AFAIK // it can be simulated with holding a special key on the keydoard. - Mouse_left = 1; - Mouse_right = 2; - Kbd_shift = 4; - Kbd_ctrl = 8; + TMouseKeyboardFlag = ( + mkfMouseLeft, + mkfMouseRight, + mkfShift, + mkfCtrl + ); + TMouseKeyboardFlags = set of TMouseKeyboardFlag; // --------------------------------------------------------------key_code_e // Keyboard codes. There's also a restricted set of codes that are most @@ -152,70 +177,74 @@ interface // Actually the numeric key codes are taken from the SDL library, so, // the implementation of the SDL support does not require any mapping. // ASCII set. Should be supported everywhere - Cardinal(kcBackspace = 8; - Cardinal(kcTab = 9; - Cardinal(kcClear = 12; - Cardinal(kcReturn = 13; - Cardinal(kcPause = 19; - Cardinal(kcEscape = 27; - - // Keypad - Cardinal(kcDelete = 127; - Cardinal(kcPad0 = 256; - Cardinal(kcPad1 = 257; - Cardinal(kcPad2 = 258; - Cardinal(kcPad3 = 259; - Cardinal(kcPad4 = 260; - Cardinal(kcPad5 = 261; - Cardinal(kcPad6 = 262; - Cardinal(kcPad7 = 263; - Cardinal(kcPad8 = 264; - Cardinal(kcPad9 = 265; - Cardinal(kcPadPeriod = 266; - Cardinal(kcPadDivide = 267; - Cardinal(kcPadMultiply = 268; - Cardinal(kcPadMinus = 269; - Cardinal(kcPadPlus = 270; - Cardinal(kcPadEnter = 271; - Cardinal(kcPadEquals = 272; - - // Arrow-keys and stuff - Cardinal(kcUp = 273; - Cardinal(kcDown = 274; - Cardinal(kcRight = 275; - Cardinal(kcLeft = 276; - Cardinal(kcInsert = 277; - Cardinal(kcHome = 278; - Cardinal(kcEnd = 279; - Cardinal(kcPageUp = 280; - Cardinal(kcPageDown = 281; - - // Functional keys. You'd better avoid using - // f11...f15 in your applications if you want - // the applications to be portable - Cardinal(kcF1 = 282; - Cardinal(kcF2 = 283; - Cardinal(kcF3 = 284; - Cardinal(kcF4 = 285; - Cardinal(kcF5 = 286; - Cardinal(kcF6 = 287; - Cardinal(kcF7 = 288; - Cardinal(kcF8 = 289; - Cardinal(kcF9 = 290; - Cardinal(kcF10 = 291; - Cardinal(kcF11 = 292; - Cardinal(kcF12 = 293; - Cardinal(kcF13 = 294; - Cardinal(kcF14 = 295; - Cardinal(kcF15 = 296; - - // The possibility of using these keys is - // very restricted. Actually it's guaranteed - // only in win32_api and win32_sdl implementations - Cardinal(kcNumlock = 300; - Cardinal(kcCapslock = 301; - Cardinal(kcScrollLock = 302; + TKeyCode = ( + kcNone = 0, + kcBackspace = 8, + kcTab = 9, + kcClear = 12, + kcReturn = 13, + kcPause = 19, + kcEscape = 27, + + // Keypad + kcDelete = 127, + kcPad0 = 256, + kcPad1 = 257, + kcPad2 = 258, + kcPad3 = 259, + kcPad4 = 260, + kcPad5 = 261, + kcPad6 = 262, + kcPad7 = 263, + kcPad8 = 264, + kcPad9 = 265, + kcPadPeriod = 266, + kcPadDivide = 267, + kcPadMultiply = 268, + kcPadMinus = 269, + kcPadPlus = 270, + kcPadEnter = 271, + kcPadEquals = 272, + + // Arrow-keys and stuff + kcUp = 273, + kcDown = 274, + kcRight = 275, + kcLeft = 276, + kcInsert = 277, + kcHome = 278, + kcEnd = 279, + kcPageUp = 280, + kcPageDown = 281, + + // Functional keys. You'd better avoid using + // f11...f15 in your applications if you want + // the applications to be portable + kcF1 = 282, + kcF2 = 283, + kcF3 = 284, + kcF4 = 285, + kcF5 = 286, + kcF6 = 287, + kcF7 = 288, + kcF8 = 289, + kcF9 = 290, + kcF10 = 291, + kcF11 = 292, + kcF12 = 293, + kcF13 = 294, + kcF14 = 295, + kcF15 = 296, + + // The possibility of using these keys is + // very restricted. Actually it's guaranteed + // only in win32_api and win32_sdl implementations + kcNumlock = 300, + kcCapslock = 301, + kcScrollLock = 302 + ); +const CMaxControl = 128; type @@ -226,23 +255,18 @@ interface TControlContainer = class private FControl: array [0..CMaxControl - 1] of TAggCustomAggControl; - FNumControls: Cardinal; FCurrentControl: Integer; public - constructor Create; - + constructor Create(); + destructor Destroy(); procedure Add(C: TAggCustomAggControl); - function InRect(X, Y: Double): Boolean; - + function SetCurrent(X, Y: Double): Boolean; function OnMouseButtonDown(X, Y: Double): Boolean; function OnMouseButtonUp(X, Y: Double): Boolean; - function OnMouseMove(X, Y: Double; ButtonFlag: Boolean): Boolean; function OnArrowKeys(Left, Right, Down, Up: Boolean): Boolean; - - function SetCurrent(X, Y: Double): Boolean; end; // This class is a base one to the apllication classes. It can be used @@ -250,31 +274,30 @@ TControlContainer = class // // TAggApplication = class(TPlatformSupport) // - // constructor Create(bpp : Cardinal; FlipY : boolean ); + // constructor Create(PixelFormat: TPixelFormat; FlipY: Boolean); // . . . // // //override stuff . . . - // procedure OnInit; virtual; - // procedure OnDraw; virtual; - // procedure OnResize(sx ,sy : int ); virtual; + // procedure OnInit(); virtual; + // procedure OnDraw(); virtual; + // procedure OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); virtual; // // . . . and so on, see virtual functions // // //any your own stuff . . . // }; // - // VAR - // app : TAggApplication; + // var + // app : TAggApplication; // - // BEGIN - // app.Create(pix_formatRgb24 ,true ); - // app.caption ("AGG Example. Lion" ); + // begin + // app := TAggApplication.Create(pfBgra32, CFlipY); + // app.caption ("AGG Example. Lion" ); // - // if app.init(500 ,400 ,wfResize ) then - // app.run; + // if app.init(500 ,400 ,wfResize ) then + // app.run; // - // app.Free; - // - // END. + // app.Free; + // end. // const CMaxImages = 16; @@ -284,7 +307,6 @@ TPlatformSpecific = class private FPixelFormat, FSystemFormat: TPixelFormat; FByteOrder: Integer; - FFlipY: Boolean; FBitsPerPixel, FSystemBitsPerPixel: Cardinal; FDisplay: PDisplay; @@ -292,59 +314,91 @@ TPlatformSpecific = class FVisual: PVisual; FWindow: TWindow; FGraphicContext: TGC; - FWindowAttributes: TXSetWindowAttributes; - FXImageWindow: PXImage; FCloseAtom: TAtom; FBufferWindow: Pointer; FBufferAlloc: Cardinal; FBufferImage: array [0..CMaxImages - 1] of Pointer; FImageAlloc: array [0..CMaxImages - 1] of Cardinal; - FKeymap: array [0..255] of Cardinal; - FUpdateFlag, FResizeFlag, FInitialized: Boolean; - - // FWaitMode : boolean; FSwStart: Clock_t; public constructor Create(Format: TPixelFormat; FlipY: Boolean); - + destructor Destroy; override; procedure SetCaption(Capt: PAnsiChar); - procedure Put_image(Src: TAggRenderingBuffer); + procedure PutImage(Src: TAggRenderingBuffer); end; TPlatformSupport = class private FSpecific: TPlatformSpecific; FControls: TControlContainer; - FPixelFormat: TPixelFormat; - FBitsPerPixel: Cardinal; - FRenderingBufferWindow: TAggRenderingBuffer; FRenderingBufferImage: array [0..CMaxImages - 1] of TAggRenderingBuffer; - - FWindowFlags: TWindowFlag; - FWaitMode, FFlipY: Boolean; - // FlipY - true if you want to have the Y-axis flipped vertically + FWindowFlags: TWindowFlags; + FWaitMode: Boolean; + FFlipY: Boolean; FCaption: ShortString; FResizeMatrix: TAggTransAffine; - - FInitialWidth, GetInitialHeight: Integer; - + FInitialWidth, FInitialHeight: Integer; FQuit: Boolean; - public - constructor Create(PixelFormat: TPixelFormat; FlipY: Boolean); - destructor Destroy; override; - // Setting the windows caption (title). Should be able // to be called at least before calling init(). // It's perfect if they can be called anytime. procedure SetCaption(Cap: ShortString); - + // The following provides a very simple mechanism of doing someting + // in background. It's not multitheading. When whait_mode is true + // the class waits for the events and it does not ever call OnIdle(). + // When it's false it calls OnIdle() when the event queue is empty. + // The mode can be changed anytime. This mechanism is satisfactory + // for creation very simple animations. + function GetWaitMode(): Boolean; + procedure SetWaitMode(WaitMode: Boolean); + // The very same parameters that were used in the constructor + function GetPixelFormat(): TPixelFormat; + function GetFlipY(): Boolean; + function GetBitsPerPixel(): Cardinal; + // So, finally, how to draw anythig with AGG? Very simple. + // RenderingBufferWindow() returns a reference to the main rendering + // buffer which can be attached to any rendering class. + // RenderingBufferImage() returns a reference to the previously created + // or loaded image buffer (see LoadImage()). The image buffers + // are not displayed directly, they should be copied to or + // combined somehow with the RenderingBufferWindow(). RenderingBufferWindow() is + // the only buffer that can be actually displayed. + function GetRenderingBufferWindow(): TAggRenderingBuffer; + function GetRenderingBufferImage(Index: Cardinal): TAggRenderingBuffer; + // Returns file extension used in the implemenation for the particular + // system. + function GetImageExtension(): ShortString; + // + function GetWidth(): Double; + function GetHeight(): Double; + function GetInitialWidth(): Double; + function GetInitialHeight(): Double; + function GetWindowFlags(): TWindowFlags; + protected + // Event handlers. They are not pure functions, so you don't have + // to override them all. + // In my demo applications these functions are defined inside + // the TAggApplication class + procedure OnInit(); virtual; + procedure OnResize(Width, Height: Integer); virtual; + procedure OnIdle(); virtual; + procedure OnMouseMove(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; + procedure OnMouseButtonDown(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; + procedure OnMouseButtonUp(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; + procedure OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); virtual; + procedure OnControlChange(); virtual; + procedure OnDraw(); virtual; + procedure OnPostDraw(RawHandler: Pointer); virtual; + public + constructor Create(PixelFormat: TPixelFormat; FlipY: Boolean); + destructor Destroy(); override; // These 3 menthods handle working with images. The image // formats are the simplest ones, such as .BMP in Windows or // .ppm in Linux. In the applications the names of the files @@ -355,9 +409,7 @@ TPlatformSupport = class // The argument "idx" is the number of the image 0...CMaxImages-1 function LoadImage(Index: Cardinal; File_: ShortString): Boolean; function SaveImage(Index: Cardinal; File_: ShortString): Boolean; - function CreateImage(Index: Cardinal; AWidth: Cardinal = 0; - AHeight: Cardinal = 0): Boolean; - + function CreateImage(Index: Cardinal; AWidth: Cardinal = 0; AHeight: Cardinal = 0): Boolean; // init() and run(). See description before the class for details. // The necessity of calling init() after creation is that it's // impossible to call the overridden virtual function (OnInit()) @@ -365,24 +417,9 @@ TPlatformSupport = class // some OnInit() event handler when the window is created but // not yet displayed. The RenderingBufferWindow() method (see below) is // accessible from OnInit(). - function Init(AWidth, AHeight: Cardinal; Flags: TWindowFlag): Boolean; - function Run: Integer; - procedure Quit; - - // The very same parameters that were used in the constructor - function GetPixelFormat: TPixelFormat; - function GetFlipY: Boolean; - function GetBitsPerPixel: Cardinal; - - // The following provides a very simple mechanism of doing someting - // in background. It's not multitheading. When whait_mode is true - // the class waits for the events and it does not ever call OnIdle(). - // When it's false it calls OnIdle() when the event queue is empty. - // The mode can be changed anytime. This mechanism is satisfactory - // for creation very simple animations. - function GetWaitMode: Boolean; - procedure SetWaitMode(WaitMode: Boolean); - + function Init(AWidth, AHeight: Cardinal; Flags: TWindowFlags): Boolean; + function Run(): Integer; + procedure Quit(); // These two functions control updating of the window. // force_redraw() is an analog of the Win32 InvalidateRect() function. // Being called it sets a flag (or sends a message) which results @@ -391,47 +428,12 @@ TPlatformSupport = class // update_window() results in just putting immediately the content // of the currently rendered buffer to the window without calling // OnDraw(). - procedure ForceRedraw; - procedure UpdateWindow; - - // So, finally, how to draw anythig with AGG? Very simple. - // RenderingBufferWindow() returns a reference to the main rendering - // buffer which can be attached to any rendering class. - // RenderingBufferImage() returns a reference to the previously created - // or loaded image buffer (see LoadImage()). The image buffers - // are not displayed directly, they should be copied to or - // combined somehow with the RenderingBufferWindow(). RenderingBufferWindow() is - // the only buffer that can be actually displayed. - function RenderingBufferWindow: TAggRenderingBuffer; - function RenderingBufferImage(Index: Cardinal): TAggRenderingBuffer; - - // Returns file extension used in the implemenation for the particular - // system. - function GetImageExtension: ShortString; - + procedure ForceRedraw(); + procedure UpdateWindow(); // procedure CopyImageToWindow(Index: Cardinal); procedure CopyWindowToImage(Index: Cardinal); procedure CopyImageToImage(IndexTo, IndexFrom: Cardinal); - - // Event handlers. They are not pure functions, so you don't have - // to override them all. - // In my demo applications these functions are defined inside - // the TAggApplication class - procedure OnInit; virtual; - procedure OnResize(Width, Height: Integer); virtual; - procedure OnIdle; virtual; - - procedure OnMouseMove(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; - - procedure OnMouseButtonDown(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; - procedure OnMouseButtonUp(X, Y: Integer; Flags: TMouseKeyboardFlags); virtual; - - procedure OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); virtual; - procedure OnControlChange; virtual; - procedure OnDraw; virtual; - procedure OnPostDraw(RawHandler: Pointer); virtual; - // Adding control elements. A control element once added will be // working and reacting to the mouse and keyboard events. Still, you // will have to render them in the OnDraw() using function @@ -442,7 +444,6 @@ TPlatformSupport = class // If you don't need a particular control to be scaled automatically // call Control.NoTransform after adding. procedure AddControl(C: TAggCustomAggControl); - // Auxiliary functions. SetTransAffineResizing() modifier sets up the resizing // matrix on the basis of the given width and height and the initial // width and height of the window. The implementation should simply @@ -456,14 +457,7 @@ TPlatformSupport = class // width(), height(), initial_width(), and initial_height() must be // clear to understand with no comments :-) procedure SetTransAffineResizing(AWidth, AHeight: Integer); - function GetTransAffineResizing: TAggTransAffine; - - function GetWidth: Double; - function GetHeight: Double; - function GetInitialWidth: Double; - function GetInitialHeight: Double; - function GetWindowFlags: Cardinal; - + function GetTransAffineResizing(): TAggTransAffine; // Get raw display handler depending on the system. // For win32 its an HDC, for other systems it can be a pointer to some // structure. See the implementation files for detals. @@ -471,19 +465,16 @@ TPlatformSupport = class // If it's null the raw_display_handler is not supported. Also, there's // no guarantee that this function is implemented, so, in some // implementations you may have simply an unresolved symbol when linking. - function GetRawDisplayHandler: Pointer; - + function GetRawDisplayHandler(): Pointer; // display message box or print the message to the console // (depending on implementation) procedure DisplayMessage(Msg: PAnsiChar); - // Stopwatch functions. Function GetElapsedTime() returns time elapsed // since the latest start_timer() invocation in millisecods. // The resolutoin depends on the implementation. // In Win32 it uses QueryPerformanceFrequency() / QueryPerformanceCounter(). - procedure StartTimer; - function GetElapsedTime: Double; - + procedure StartTimer(); + function GetElapsedTime(): Double; // Get the full file name. In most cases it simply returns // FileName. As it's appropriate in many systems if you open // a file by its name without specifying the path, it tries to @@ -499,20 +490,77 @@ TPlatformSupport = class // FILE* fd = fopen("some.file", "r"); function FullFileName(FileName: ShortString): ShortString; function FileSource(Path, FName: ShortString): ShortString; - + public + property Caption: ShortString read FCaption write SetCaption; + property WaitMode: Boolean read GetWaitMode write SetWaitMode; + property RenderingBufferWindow: TAggRenderingBuffer read GetRenderingBufferWindow; + property RenderingBufferImage[Index: Cardinal]: TAggRenderingBuffer read GetRenderingBufferImage; + property ImageExtension: ShortString read GetImageExtension; + property ControlContainer: TControlContainer read FControls; + property PixelFormat: TPixelFormat read FPixelFormat; + property FlipY: Boolean read FFlipY; + property BitsPerPixel: Cardinal read FBitsPerPixel; + property WindowFlags: TWindowFlags read FWindowFlags; + property Width: Double read GetWidth; + property Height: Double read GetHeight; + property InitialWidth: Integer read FInitialWidth; + property InitialHeight: Integer read FInitialHeight; end; implementation +{ IsDigit } +function IsDigit(C: AnsiChar): Boolean; +begin + case C of + '0'..'9': + Result := True; + else + Result := False; + end; +end; + +{ AtoI } +function AtoI(C: PAnsiChar): Integer; +var + S: ShortString; + E: Integer; +begin + E := 0; + S := ''; + + repeat + case C^ of + '0'..'9': + S := S + C^; + + else + Break; + + end; + + Inc(PtrComp(C)); + + until False; + + Val(S, Result, E); + +end; + { TControlContainer } -constructor TControlContainer.Create; +constructor TControlContainer.Create(); begin FNumControls := 0; FCurrentControl := -1; end; -procedure TControlContainer.Add; +destructor TControlContainer.Destroy(); +begin + inherited; +end; + +procedure TControlContainer.Add(C: TAggCustomAggControl); begin if FNumControls < CMaxControl then begin @@ -594,7 +642,7 @@ function TControlContainer.OnArrowKeys(Left, Right, Down, Up: Boolean): Boolean; Result := FControl[FCurrentControl].OnArrowKeys(Left, Right, Down, Up); end; -function TControlContainer.SetCurrent; +function TControlContainer.SetCurrent(X, Y: Double): Boolean; var I: Cardinal; begin @@ -622,7 +670,6 @@ function TControlContainer.SetCurrent; end; end; - { TPlatformSpecific } constructor TPlatformSpecific.Create(Format: TPixelFormat; FlipY: Boolean); @@ -633,7 +680,6 @@ constructor TPlatformSpecific.Create(Format: TPixelFormat; FlipY: Boolean); FSystemFormat := pfUndefined; FByteOrder := LSBFirst; FFlipY := FlipY; - FBitsPerPixel := 0; FSystemBitsPerPixel := 0; FDisplay := nil; @@ -642,84 +688,81 @@ constructor TPlatformSpecific.Create(Format: TPixelFormat; FlipY: Boolean); FVisual := nil; FWindow := 0; FGraphicContext := nil; - FXImageWindow := nil; FCloseAtom := 0; FBufferWindow := nil; FBufferAlloc := 0; - FUpdateFlag := True; FResizeFlag := True; FInitialized := False; - // FWaitMode:=true; FillChar(FBufferImage[0], SizeOf(FBufferImage), 0); for I := 0 to 255 do FKeymap[I] := I; - FKeymap[XK_Pause and $FF] := Cardinal(kcPause; - FKeymap[XK_Clear and $FF] := Cardinal(kcClear; - - FKeymap[XK_KP_0 and $FF] := Cardinal(kcPad0; - FKeymap[XK_KP_1 and $FF] := Cardinal(kcPad1; - FKeymap[XK_KP_2 and $FF] := Cardinal(kcPad2; - FKeymap[XK_KP_3 and $FF] := Cardinal(kcPad3; - FKeymap[XK_KP_4 and $FF] := Cardinal(kcPad4; - FKeymap[XK_KP_5 and $FF] := Cardinal(kcPad5; - FKeymap[XK_KP_6 and $FF] := Cardinal(kcPad6; - FKeymap[XK_KP_7 and $FF] := Cardinal(kcPad7; - FKeymap[XK_KP_8 and $FF] := Cardinal(kcPad8; - FKeymap[XK_KP_9 and $FF] := Cardinal(kcPad9; - - FKeymap[XK_KP_Insert and $FF] := Cardinal(kcPad0; - FKeymap[XK_KP_End and $FF] := Cardinal(kcPad1; - FKeymap[XK_KP_Down and $FF] := Cardinal(kcPad2; - FKeymap[XK_KP_Page_Down and $FF] := Cardinal(kcPad3; - FKeymap[XK_KP_Left and $FF] := Cardinal(kcPad4; - FKeymap[XK_KP_Begin and $FF] := Cardinal(kcPad5; - FKeymap[XK_KP_Right and $FF] := Cardinal(kcPad6; - FKeymap[XK_KP_Home and $FF] := Cardinal(kcPad7; - FKeymap[XK_KP_Up and $FF] := Cardinal(kcPad8; - FKeymap[XK_KP_Page_Up and $FF] := Cardinal(kcPad9; - FKeymap[XK_KP_Delete and $FF] := Cardinal(kcPadPeriod; - FKeymap[XK_KP_Decimal and $FF] := Cardinal(kcPadPeriod; - FKeymap[XK_KP_Divide and $FF] := Cardinal(kcPadDivide; - FKeymap[XK_KP_Multiply and $FF] := Cardinal(kcPadMultiply; - FKeymap[XK_KP_Subtract and $FF] := Cardinal(kcPadMinus; - FKeymap[XK_KP_Add and $FF] := Cardinal(kcPadPlus; - FKeymap[XK_KP_Enter and $FF] := Cardinal(kcPadEnter; - FKeymap[XK_KP_Equal and $FF] := Cardinal(kcPadEquals; - - FKeymap[XK_Up and $FF] := Cardinal(kcUp; - FKeymap[XK_Down and $FF] := Cardinal(kcDown; - FKeymap[XK_Right and $FF] := Cardinal(kcRight; - FKeymap[XK_Left and $FF] := Cardinal(kcLeft; - FKeymap[XK_Insert and $FF] := Cardinal(kcInsert; - FKeymap[XK_Home and $FF] := Cardinal(kcDelete; - FKeymap[XK_End and $FF] := Cardinal(kcEnd; - FKeymap[XK_Page_Up and $FF] := Cardinal(kcPageUp; - FKeymap[XK_Page_Down and $FF] := Cardinal(kcPageDown; - - FKeymap[XK_F1 and $FF] := Cardinal(kcF1; - FKeymap[XK_F2 and $FF] := Cardinal(kcF2; - FKeymap[XK_F3 and $FF] := Cardinal(kcF3; - FKeymap[XK_F4 and $FF] := Cardinal(kcF4; - FKeymap[XK_F5 and $FF] := Cardinal(kcF5; - FKeymap[XK_F6 and $FF] := Cardinal(kcF6; - FKeymap[XK_F7 and $FF] := Cardinal(kcF7; - FKeymap[XK_F8 and $FF] := Cardinal(kcF8; - FKeymap[XK_F9 and $FF] := Cardinal(kcF9; - FKeymap[XK_F10 and $FF] := Cardinal(kcF10; - FKeymap[XK_F11 and $FF] := Cardinal(kcF11; - FKeymap[XK_F12 and $FF] := Cardinal(kcF12; - FKeymap[XK_F13 and $FF] := Cardinal(kcF13; - FKeymap[XK_F14 and $FF] := Cardinal(kcF14; - FKeymap[XK_F15 and $FF] := Cardinal(kcF15; - - FKeymap[XK_Num_Lock and $FF] := Cardinal(kcNumlock; - FKeymap[XK_Caps_Lock and $FF] := Cardinal(kcCapslock; - FKeymap[XK_Scroll_Lock and $FF] := Cardinal(kcScrollLock; + FKeymap[XK_Pause and $FF] := LongWord(kcPause); + FKeymap[XK_Clear and $FF] := LongWord(kcClear); + + FKeymap[XK_KP_0 and $FF] := LongWord(kcPad0); + FKeymap[XK_KP_1 and $FF] := LongWord(kcPad1); + FKeymap[XK_KP_2 and $FF] := LongWord(kcPad2); + FKeymap[XK_KP_3 and $FF] := LongWord(kcPad3); + FKeymap[XK_KP_4 and $FF] := LongWord(kcPad4); + FKeymap[XK_KP_5 and $FF] := LongWord(kcPad5); + FKeymap[XK_KP_6 and $FF] := LongWord(kcPad6); + FKeymap[XK_KP_7 and $FF] := LongWord(kcPad7); + FKeymap[XK_KP_8 and $FF] := LongWord(kcPad8); + FKeymap[XK_KP_9 and $FF] := LongWord(kcPad9); + + FKeymap[XK_KP_Insert and $FF] := LongWord(kcPad0); + FKeymap[XK_KP_End and $FF] := LongWord(kcPad1); + FKeymap[XK_KP_Down and $FF] := LongWord(kcPad2); + FKeymap[XK_KP_Page_Down and $FF] := LongWord(kcPad3); + FKeymap[XK_KP_Left and $FF] := LongWord(kcPad4); + FKeymap[XK_KP_Begin and $FF] := LongWord(kcPad5); + FKeymap[XK_KP_Right and $FF] := LongWord(kcPad6); + FKeymap[XK_KP_Home and $FF] := LongWord(kcPad7); + FKeymap[XK_KP_Up and $FF] := LongWord(kcPad8); + FKeymap[XK_KP_Page_Up and $FF] := LongWord(kcPad9); + FKeymap[XK_KP_Delete and $FF] := LongWord(kcPadPeriod); + FKeymap[XK_KP_Decimal and $FF] := LongWord(kcPadPeriod); + FKeymap[XK_KP_Divide and $FF] := LongWord(kcPadDivide); + FKeymap[XK_KP_Multiply and $FF] := LongWord(kcPadMultiply); + FKeymap[XK_KP_Subtract and $FF] := LongWord(kcPadMinus); + FKeymap[XK_KP_Add and $FF] := LongWord(kcPadPlus); + FKeymap[XK_KP_Enter and $FF] := LongWord(kcPadEnter); + FKeymap[XK_KP_Equal and $FF] := LongWord(kcPadEquals); + + FKeymap[XK_Up and $FF] := LongWord(kcUp); + FKeymap[XK_Down and $FF] := LongWord(kcDown); + FKeymap[XK_Right and $FF] := LongWord(kcRight); + FKeymap[XK_Left and $FF] := LongWord(kcLeft); + FKeymap[XK_Insert and $FF] := LongWord(kcInsert); + FKeymap[XK_Home and $FF] := LongWord(kcDelete); + FKeymap[XK_End and $FF] := LongWord(kcEnd); + FKeymap[XK_Page_Up and $FF] := LongWord(kcPageUp); + FKeymap[XK_Page_Down and $FF] := LongWord(kcPageDown); + + FKeymap[XK_F1 and $FF] := LongWord(kcF1); + FKeymap[XK_F2 and $FF] := LongWord(kcF2); + FKeymap[XK_F3 and $FF] := LongWord(kcF3); + FKeymap[XK_F4 and $FF] := LongWord(kcF4); + FKeymap[XK_F5 and $FF] := LongWord(kcF5); + FKeymap[XK_F6 and $FF] := LongWord(kcF6); + FKeymap[XK_F7 and $FF] := LongWord(kcF7); + FKeymap[XK_F8 and $FF] := LongWord(kcF8); + FKeymap[XK_F9 and $FF] := LongWord(kcF9); + FKeymap[XK_F10 and $FF] := LongWord(kcF10); + FKeymap[XK_F11 and $FF] := LongWord(kcF11); + FKeymap[XK_F12 and $FF] := LongWord(kcF12); + FKeymap[XK_F13 and $FF] := LongWord(kcF13); + FKeymap[XK_F14 and $FF] := LongWord(kcF14); + FKeymap[XK_F15 and $FF] := LongWord(kcF15); + + FKeymap[XK_Num_Lock and $FF] := LongWord(kcNumlock); + FKeymap[XK_Caps_Lock and $FF] := LongWord(kcCapslock); + FKeymap[XK_Scroll_Lock and $FF] := LongWord(kcScrollLock); case FPixelFormat of pfGray8: @@ -736,10 +779,15 @@ constructor TPlatformSpecific.Create(Format: TPixelFormat; FlipY: Boolean); end; - FSwStart := Clock; + FSwStart := Clock(); end; -procedure TPlatformSpecific.SetCaption; +destructor TPlatformSpecific.Destroy(); +begin + inherited; +end; + +procedure TPlatformSpecific.SetCaption(Capt: PAnsiChar); var Tp: TXTextProperty; begin @@ -754,7 +802,7 @@ procedure TPlatformSpecific.SetCaption; XSetWMIconName(FDisplay, FWindow, @Tp); end; -procedure TPlatformSpecific.Put_Image; +procedure TPlatformSpecific.PutImage(Src: TAggRenderingBuffer); var RowLength: Integer; TempBuffer: Pointer; @@ -767,158 +815,155 @@ procedure TPlatformSpecific.Put_Image; FXImageWindow.Data := FBufferWindow; if FPixelFormat = FSystemFormat then - XPut_Image(FDisplay, FWindow, FGraphicContext, FXImageWindow, 0, 0, 0, 0, - Src.GetWidth, Src.GetHeight) + XPutImage(FDisplay, FWindow, FGraphicContext, FXImageWindow, 0, 0, 0, 0, Src.Width, Src.Height) else begin - RowLength := Src.GetWidth * FSystemBitsPerPixel div 8; + RowLength := Src.Width * FSystemBitsPerPixel div 8; - AggGetMem(TempBuffer, RowLength * Src.GetHeight); + AggGetMem(TempBuffer, RowLength * Src.Height); - TempRenderingBuffer.Create; + TempRenderingBuffer:= TAggRenderingBuffer.Create(); if FFlipY then - TempRenderingBuffer.Attach(TempBuffer, Src.GetWidth, Src.GetHeight, -RowLength) + TempRenderingBuffer.Attach(TempBuffer, Src.Width, Src.Height, -RowLength) else - TempRenderingBuffer.Attach(TempBuffer, Src.GetWidth, Src.GetHeight, RowLength); + TempRenderingBuffer.Attach(TempBuffer, Src.Width, Src.Height, RowLength); case FSystemFormat of pfRgb555: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToRgb555); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToRgb555); pfRgb565: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb565ToRgb555); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb565ToRgb555); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24ToRgb555 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToRgb555); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToRgb555); // pix_formatRgba32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgba32ToRgb555 ); // pix_format_argb32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionArgb32ToRgb555 ); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToRgb555); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToRgb555); // pix_format_abgr32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionAbgr32ToRgb555 ); end; pfRgb565: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToRgb565); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToRgb565); // pix_formatRgb565 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb565ToRgb565 ); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24ToRgb565 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToRgb565); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToRgb565); // pix_formatRgba32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgba32ToRgb565 ); // pix_format_argb32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionArgb32ToRgb565 ); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToRgb565); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToRgb565); // pix_format_abgr32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionAbgr32ToRgb565 ); end; pfRgba32: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToRgba32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToRgba32); // pix_formatRgb565 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb565ToRgba32 ); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24ToRgba32 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToRgba32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToRgba32); // pix_formatRgba32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgba32ToRgba32 ); // pix_format_argb32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionArgb32ToRgba32 ); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToRgba32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToRgba32); // pix_format_abgr32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionAbgr32ToRgba32 ); end; pfAbgr32: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToAbgr32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToAbgr32); // pix_formatRgb565 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb565To_abgr32 ); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24To_abgr32 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToAbgr32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToAbgr32); // pix_format_abgr32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionAbgr32To_abgr32 ); // pix_formatRgba32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgba32To_abgr32 ); // pix_format_argb32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionArgb32To_abgr32 ); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToAbgr32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToAbgr32); end; pfArgb32: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToArgb32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToArgb32); // pix_formatRgb565 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb565To_argb32 ); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24To_argb32 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToArgb32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToArgb32); pfRgba32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgba32ToArgb32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgba32ToArgb32); // pix_format_argb32 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionArgb32To_argb32 ); pfAbgr32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionAbgr32ToArgb32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionAbgr32ToArgb32); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToArgb32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToArgb32); end; pfBgra32: case FPixelFormat of pfRgb555: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgb555ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgb555ToBgra32); // pix_formatRgb565 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb565To_bgra32 ); // pix_formatRgb24 : ColorConversion(@TempRenderingBuffer ,src ,ColorConversionRgb24ToBgra32 ); pfBgr24: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgr24ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgr24ToBgra32); pfRgba32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionRgba32ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionRgba32ToBgra32); pfArgb32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionArgb32ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionArgb32ToBgra32); pfAbgr32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionAbgr32ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionAbgr32ToBgra32); pfBgra32: - ColorConversion(@TempRenderingBuffer, Src, ColorConversionBgra32ToBgra32); + ColorConversion(TempRenderingBuffer, Src, ColorConversionBgra32ToBgra32); end; end; FXImageWindow.Data := TempBuffer; - XPut_Image(FDisplay, FWindow, FGraphicContext, FXImageWindow, 0, 0, 0, 0, - Src.GetWidth, Src.GetHeight); + XPutImage(FDisplay, FWindow, FGraphicContext, FXImageWindow, 0, 0, 0, 0, Src.Width, Src.Height); - AggFreeMem(TempBuffer, RowLength * Src.GetHeight); + AggFreeMem(TempBuffer, RowLength * Src.Height); TempRenderingBuffer.Free; end; end; - { TPlatformSupport } -constructor TPlatformSupport.Create; +constructor TPlatformSupport.Create(PixelFormat: TPixelFormat; FlipY: Boolean); var I: Cardinal; P, N, X: ShortString; begin - New(FSpecific, Create(Format_, FlipY)); + FSpecific := TPlatformSpecific.Create(PixelFormat, FlipY); - FControls := TControlContainer.Create; - FRenderingBufferWindow.Create; + FControls := TControlContainer.Create(); + FRenderingBufferWindow := TAggRenderingBuffer.Create(); for I := 0 to CMaxImages - 1 do - FRenderingBufferImage[I].Create; + FRenderingBufferImage[I] := TAggRenderingBuffer.Create(); - FResizeMatrix.Create; + FResizeMatrix := TAggTransAffine.Create(); - FPixelFormat := Format_; + FPixelFormat := PixelFormat; FBitsPerPixel := FSpecific.FBitsPerPixel; - FWindowFlags := 0; + FWindowFlags := []; FWaitMode := True; FFlipY := FlipY; FInitialWidth := 10; - GetInitialHeight := 10; + FInitialHeight := 10; FCaption := 'Anti-Grain Geometry Application'#0; @@ -927,11 +972,11 @@ constructor TPlatformSupport.Create; P := P + #0; - Libc.__chdir(PAnsiChar(@P[1])); + SetCurrentDir(p); end; -destructor TPlatformSupport.Destroy; +destructor TPlatformSupport.Destroy(); var I: Cardinal; begin @@ -946,7 +991,7 @@ destructor TPlatformSupport.Destroy; inherited; end; -procedure TPlatformSupport.SetCaption; +procedure TPlatformSupport.SetCaption(Cap: ShortString); begin FCaption := Cap + #0; @@ -956,43 +1001,7 @@ procedure TPlatformSupport.SetCaption; FSpecific.SetCaption(PAnsiChar(@FCaption[1])); end; -function IsDigit(C: AnsiChar): Boolean; -begin - case C of - '0'..'9': - Result := True; - else - Result := False; - end; -end; - -{ atoi } -function Atoi(C: PAnsiChar): Integer; -var - S: ShortString; - E: Integer; -begin - S := ''; - - repeat - case C^ of - '0'..'9': - S := S + C^; - - else - Break; - - end; - - Inc(PtrComp(C)); - - until False; - - Val(S, Result, E); - -end; - -function TPlatformSupport.LoadImage; +function TPlatformSupport.LoadImage(Index: Cardinal; File_: ShortString): Boolean; var Fd : file; Buf: array [0..1023] of AnsiChar; @@ -1103,12 +1112,15 @@ function TPlatformSupport.LoadImage; Ret := True; if FPixelFormat = pfRgb24 then + begin Blockread(Fd, FSpecific.FBufferImage[Index]^, Width * Height * 3) + end else begin + AggGetMem(Buf_img, Width * Height * 3); - RenderingBufferImage_.Create; + RenderingBufferImage_ := TAggRenderingBuffer.Create(); if FFlipY then RenderingBufferImage_.Attach(Buf_img, Width, Height, -Width * 3) @@ -1121,11 +1133,11 @@ function TPlatformSupport.LoadImage; // pix_formatRgb555 : ColorConversion(@m_RenderingBufferImage[Index ] ,@RenderingBufferImage_ ,ColorConversionRgb24ToRgb555 ); // pix_formatRgb565 : ColorConversion(@m_RenderingBufferImage[Index ] ,@RenderingBufferImage_ ,ColorConversionRgb24ToRgb565 ); pfBgr24: - ColorConversion(@FRenderingBufferImage[Index], @RenderingBufferImage_, ColorConversionRgb24ToBgr24); + ColorConversion(FRenderingBufferImage[Index], RenderingBufferImage_, ColorConversionRgb24ToBgr24); // pix_formatRgba32 : ColorConversion(@m_RenderingBufferImage[Index ] ,@RenderingBufferImage_ ,ColorConversionRgb24ToRgba32 ); // pix_format_argb32 : ColorConversion(@m_RenderingBufferImage[Index ] ,@RenderingBufferImage_ ,ColorConversionRgb24To_argb32 ); pfBgra32: - ColorConversion(@FRenderingBufferImage[Index], @RenderingBufferImage_, ColorConversionRgb24ToBgra32); + ColorConversion(FRenderingBufferImage[Index], RenderingBufferImage_, ColorConversionRgb24ToBgra32); // pix_format_abgr32 : ColorConversion(@m_RenderingBufferImage[Index ] ,@RenderingBufferImage_ ,ColorConversionRgb24To_abgr32 ); else Ret := False; @@ -1155,7 +1167,7 @@ function TPlatformSupport.SaveImage(Index: Cardinal; File_: ShortString): Boolea begin Result := False; - if (Index < CMaxImages) and (RenderingBufferImage(Index).GetBuffer <> nil) then + if (Index < CMaxImages) and (RenderingBufferImage[Index].Buffer <> nil) then begin AssignFile(Fd, File_); Rewrite(Fd, 1); @@ -1163,8 +1175,8 @@ function TPlatformSupport.SaveImage(Index: Cardinal; File_: ShortString): Boolea if IOResult <> 0 then Exit; - W := RenderingBufferImage(Index).GetWidth; - H := RenderingBufferImage(Index).GetHeight; + W := RenderingBufferImage[Index].Width; + H := RenderingBufferImage[Index].Height; Str(W, C); @@ -1180,12 +1192,12 @@ function TPlatformSupport.SaveImage(Index: Cardinal; File_: ShortString): Boolea Y := 0; - while Y < RenderingBufferImage(Index).GetHeight do + while Y < RenderingBufferImage[Index].Height do begin if FFlipY then - Src := RenderingBufferImage(Index).Row(H - 1 - Y) + Src := RenderingBufferImage[Index].Row(H - 1 - Y) else - Src := RenderingBufferImage(Index).Row(Y); + Src := RenderingBufferImage[Index].Row(Y); case FPixelFormat of pfRgb555: @@ -1212,7 +1224,7 @@ function TPlatformSupport.SaveImage(Index: Cardinal; File_: ShortString): Boolea end; end; -function TPlatformSupport.CreateImage; +function TPlatformSupport.CreateImage(Index: Cardinal; AWidth: Cardinal = 0; AHeight: Cardinal = 0): Boolean; begin Result := False; @@ -1231,20 +1243,17 @@ function TPlatformSupport.CreateImage; AggGetMem(FSpecific.FBufferImage[Index], FSpecific.FImageAlloc[Index]); if FFlipY then - FRenderingBufferImage[Index].Attach(FSpecific.FBufferImage[Index], AWidth, AHeight, - -AWidth * (FBitsPerPixel div 8)) + FRenderingBufferImage[Index].Attach(FSpecific.FBufferImage[Index], AWidth, AHeight, -AWidth * (FBitsPerPixel div 8)) else - FRenderingBufferImage[Index].Attach(FSpecific.FBufferImage[Index], AWidth, AHeight, - AWidth * (FBitsPerPixel div 8)); + FRenderingBufferImage[Index].Attach(FSpecific.FBufferImage[Index], AWidth, AHeight, AWidth * (FBitsPerPixel div 8)); Result := True; end; end; -function TPlatformSupport.Init; +function TPlatformSupport.Init(AWidth, AHeight: Cardinal; Flags: TWindowFlags): Boolean; const - Xevent_mask = PointerMotionMask or ButtonPressMask or ButtonReleaseMask or - ExposureMask or KeyPressMask or StructureNotifyMask; + Xevent_mask = PointerMotionMask or ButtonPressMask or ButtonReleaseMask or ExposureMask or KeyPressMask or StructureNotifyMask; var R_mask, G_mask, B_mask, Window_mask: Cardinal; T, Hw_byte_order: Integer; @@ -1264,10 +1273,8 @@ function TPlatformSupport.Init; end; FSpecific.FScreen := XDefaultScreen(FSpecific.FDisplay); - FSpecific.FDepth := XDefaultDepth(FSpecific.FDisplay, - FSpecific.FScreen); - FSpecific.FVisual := XDefaultVisual(FSpecific.FDisplay, - FSpecific.FScreen); + FSpecific.FDepth := XDefaultDepth(FSpecific.FDisplay, FSpecific.FScreen); + FSpecific.FVisual := XDefaultVisual(FSpecific.FDisplay, FSpecific.FScreen); R_mask := FSpecific.FVisual.Red_mask; G_mask := FSpecific.FVisual.Green_mask; @@ -1276,10 +1283,8 @@ function TPlatformSupport.Init; if (FSpecific.FDepth < 15) or (R_mask = 0) or (G_mask = 0) or (B_mask = 0) then begin - Writeln(Stderr, - 'There''s no Visual compatible with minimal AGG requirements:'); - Writeln(Stderr, - 'At least 15-bit color depth and True- or DirectColor class.'); + Writeln(Stderr, 'There''s no Visual compatible with minimal AGG requirements:'); + Writeln(Stderr, 'At least 15-bit color depth and True- or DirectColor class.'); Writeln(Stderr); XCloseDisplay(FSpecific.FDisplay); @@ -1398,23 +1403,17 @@ function TPlatformSupport.Init; end; - FillChar(FSpecific.FWindowAttributes, - SizeOf(FSpecific.FWindowAttributes), 0); + FillChar(FSpecific.FWindowAttributes, SizeOf(FSpecific.FWindowAttributes), 0); - FSpecific.FWindowAttributes.Border_pixel := - XBlackPixel(FSpecific.FDisplay, FSpecific.FScreen); + FSpecific.FWindowAttributes.Border_pixel := XBlackPixel(FSpecific.FDisplay, FSpecific.FScreen); - FSpecific.FWindowAttributes.Background_pixel := - XWhitePixel(FSpecific.FDisplay, FSpecific.FScreen); + FSpecific.FWindowAttributes.Background_pixel := XWhitePixel(FSpecific.FDisplay, FSpecific.FScreen); - FSpecific.FWindowAttributes.Override_redirect := False; + FSpecific.FWindowAttributes.Override_redirect := xFalse; Window_mask := CWBackPixel or CWBorderPixel; - FSpecific.FWindow := XCreateWindow(FSpecific.FDisplay, - XDefaultRootWindow(FSpecific.FDisplay), 0, 0, AWidth, AHeight, 0, - FSpecific.FDepth, InputOutput, CopyFromParent, Window_mask, - @FSpecific.FWindowAttributes); + FSpecific.FWindow := XCreateWindow(FSpecific.FDisplay, XDefaultRootWindow(FSpecific.FDisplay), 0, 0, AWidth, AHeight, 0, FSpecific.FDepth, InputOutput, CopyFromParent, Window_mask, @FSpecific.FWindowAttributes); FSpecific.FGraphicContext := XCreateGC(FSpecific.FDisplay, FSpecific.FWindow, 0, 0); @@ -1424,23 +1423,18 @@ function TPlatformSupport.Init; FillChar(FSpecific.FBufferWindow^, FSpecific.FBufferAlloc, 255); if FFlipY then - FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, AWidth, AHeight, - -AWidth * (FBitsPerPixel div 8)) + FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, AWidth, AHeight, -AWidth * (FBitsPerPixel div 8)) else - FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, AWidth, AHeight, - AWidth * (FBitsPerPixel div 8)); + FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, AWidth, AHeight, AWidth * (FBitsPerPixel div 8)); - FSpecific.FXImageWindow := XCreateImage(FSpecific.FDisplay, - FSpecific.FVisual, // CopyFromParent, - FSpecific.FDepth, ZPixmap, 0, FSpecific.FBufferWindow, AWidth, AHeight, - FSpecific.FSystemBitsPerPixel, AWidth * (FSpecific.FSystemBitsPerPixel div 8)); + FSpecific.FXImageWindow := XCreateImage(FSpecific.FDisplay, FSpecific.FVisual, FSpecific.FDepth, ZPixmap, 0, FSpecific.FBufferWindow, AWidth, AHeight, FSpecific.FSystemBitsPerPixel, AWidth * (FSpecific.FSystemBitsPerPixel div 8)); FSpecific.FXImageWindow.Byte_order := FSpecific.FByteOrder; FSpecific.SetCaption(PAnsiChar(@FCaption[1])); FInitialWidth := AWidth; - GetInitialHeight := AHeight; + FInitialHeight := AHeight; if not FSpecific.FInitialized then begin @@ -1460,7 +1454,7 @@ function TPlatformSupport.Init; if Hints <> nil then begin - if Flags and wfResize <> 0 then + if wfResize in FWindowFlags then begin Hints.Min_width := 32; Hints.Min_height := 32; @@ -1487,19 +1481,18 @@ function TPlatformSupport.Init; XMapWindow(FSpecific.FDisplay, FSpecific.FWindow); XSelectInput(FSpecific.FDisplay, FSpecific.FWindow, Xevent_mask); - FSpecific.FCloseAtom := XInternAtom(FSpecific.FDisplay, - 'WM_DELETE_WINDOW', False); + FSpecific.FCloseAtom := XInternAtom(FSpecific.FDisplay, 'WM_DELETE_WINDOW', False); - XSetWMProtocols(FSpecific.FDisplay, FSpecific.FWindow, - @FSpecific.FCloseAtom, 1); + XSetWMProtocols(FSpecific.FDisplay, FSpecific.FWindow, @FSpecific.FCloseAtom, 1); Result := True; end; -function TPlatformSupport.Run; +function TPlatformSupport.Run(): Integer; var - Flags, I: Cardinal; + Flags: TMouseKeyboardFlags; + I: Cardinal; Cur_x, Cur_y, Width, Height: Integer; X_event, Te: TXEvent; Key: TKeySym; @@ -1514,8 +1507,8 @@ function TPlatformSupport.Run; begin if FSpecific.FUpdateFlag then begin - OnDraw; - UpdateWindow; + OnDraw(); + UpdateWindow(); FSpecific.FUpdateFlag := False; end; @@ -1523,7 +1516,7 @@ function TPlatformSupport.Run; if not FWaitMode then if XPending(FSpecific.FDisplay) = 0 then begin - OnIdle; + OnIdle(); Continue; end; @@ -1550,8 +1543,7 @@ function TPlatformSupport.Run; case X_event._type of ConfigureNotify: - if (X_event.Xconfigure.Width <> Trunc(FRenderingBufferWindow.Width)) or - (X_event.Xconfigure.Height <> Trunc(FRenderingBufferWindow.Height)) then + if (X_event.Xconfigure.Width <> Trunc(FRenderingBufferWindow.Width)) or (X_event.Xconfigure.Height <> Trunc(FRenderingBufferWindow.Height)) then begin Width := X_event.Xconfigure.Width; Height := X_event.Xconfigure.Height; @@ -1567,29 +1559,24 @@ function TPlatformSupport.Run; AggGetMem(FSpecific.FBufferWindow, FSpecific.FBufferAlloc); if FFlipY then - FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, Width, Height, - -Width * (FBitsPerPixel div 8)) + FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, Width, Height, -Width * (FBitsPerPixel div 8)) else - FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, Width, Height, - Width * (FBitsPerPixel div 8)); + FRenderingBufferWindow.Attach(FSpecific.FBufferWindow, Width, Height, Width * (FBitsPerPixel div 8)); - FSpecific.FXImageWindow := XCreateImage(FSpecific.FDisplay, - FSpecific.FVisual, // CopyFromParent, - FSpecific.FDepth, ZPixmap, 0, FSpecific.FBufferWindow, Width, - Height, FSpecific.FSystemBitsPerPixel, Width * (FSpecific.FSystemBitsPerPixel div 8)); + FSpecific.FXImageWindow := XCreateImage(FSpecific.FDisplay, FSpecific.FVisual, FSpecific.FDepth, ZPixmap, 0, FSpecific.FBufferWindow, Width, Height, FSpecific.FSystemBitsPerPixel, Width * (FSpecific.FSystemBitsPerPixel div 8)); FSpecific.FXImageWindow.Byte_order := FSpecific.FByteOrder; SetTransAffineResizing(Width, Height); OnResize(Width, Height); - OnDraw; - UpdateWindow; + OnDraw(); + UpdateWindow(); end; Expose: begin - FSpecific.Put_image(@FRenderingBufferWindow); + FSpecific.PutImage(@FRenderingBufferWindow); XFlush(FSpecific.FDisplay); XSync(FSpecific.FDisplay, False); @@ -1598,19 +1585,19 @@ function TPlatformSupport.Run; KeyPress: begin Key := XLookupKeysym(@X_event.Xkey, 0); - Flags := 0; + Flags := []; if X_event.Xkey.State and Button1Mask <> 0 then - Flags := Flags or Mouse_left; + Include(Flags, mkfMouseLeft); if X_event.Xkey.State and Button3Mask <> 0 then - Flags := Flags or Mouse_right; + Include(Flags, mkfMouseRight); if X_event.Xkey.State and ShiftMask <> 0 then - Flags := Flags or Kbd_shift; + Include(Flags, mkfShift); if X_event.Xkey.State and ControlMask <> 0 then - Flags := Flags or Kbd_ctrl; + Include(Flags, mkfCtrl); Left := False; Up := False; @@ -1618,16 +1605,15 @@ function TPlatformSupport.Run; Down := False; case FSpecific.FKeymap[Key and $FF] of - Cardinal(kcLeft: + Cardinal(kcLeft): Left := True; - Cardinal(kcUp: + Cardinal(kcUp): Up := True; - Cardinal(kcRight: + Cardinal(kcRight): Right := True; - Cardinal(kcDown: + Cardinal(kcDown): Down := True; - - Cardinal(kcF2: + Cardinal(kcF2): begin CopyWindowToImage(CMaxImages - 1); SaveImage(CMaxImages - 1, 'screenshot.ppm'); @@ -1636,32 +1622,34 @@ function TPlatformSupport.Run; if FControls.OnArrowKeys(Left, Right, Down, Up) then begin - OnControlChange; - ForceRedraw; + OnControlChange(); + ForceRedraw(); end else if FFlipY then - OnKey(X_event.Xkey.X, Trunc(FRenderingBufferWindow.Height) - - X_event.Xkey.Y, FSpecific.FKeymap[Key and $FF], Flags) + begin + OnKey(X_event.Xkey.X, Trunc(FRenderingBufferWindow.Height) - X_event.Xkey.Y, FSpecific.FKeymap[Key and $FF], Flags); + end else - OnKey(X_event.Xkey.X, X_event.Xkey.Y, - FSpecific.FKeymap[Key and $FF], Flags) + begin + OnKey(X_event.Xkey.X, X_event.Xkey.Y, FSpecific.FKeymap[Key and $FF], Flags); + end; end; ButtonPress: begin - Flags := 0; + Flags := []; if X_event.Xbutton.State and ShiftMask <> 0 then - Flags := Flags or Kbd_shift; + Include(Flags, mkfShift); if X_event.Xbutton.State and ControlMask <> 0 then - Flags := Flags or Kbd_ctrl; + Include(Flags, mkfCtrl); if X_event.Xbutton.Button = Button1 then - Flags := Flags or Mouse_left; + Include(Flags, mkfMouseLeft); if X_event.Xbutton.Button = Button3 then - Flags := Flags or Mouse_right; + Include(Flags, mkfMouseRight); Cur_x := X_event.Xbutton.X; @@ -1674,14 +1662,14 @@ function TPlatformSupport.Run; if FControls.OnMouseButtonDown(Cur_x, Cur_y) then begin FControls.SetCurrent(Cur_x, Cur_y); - OnControlChange; - ForceRedraw; + OnControlChange(); + ForceRedraw(); end else if FControls.InRect(Cur_x, Cur_y) then if FControls.SetCurrent(Cur_x, Cur_y) then begin - OnControlChange; - ForceRedraw; + OnControlChange(); + ForceRedraw(); end else else @@ -1696,19 +1684,19 @@ function TPlatformSupport.Run; MotionNotify: begin - Flags := 0; + Flags := []; if X_event.Xmotion.State and Button1Mask <> 0 then - Flags := Flags or Mouse_left; + Include(Flags, mkfMouseLeft); if X_event.Xmotion.State and Button3Mask <> 0 then - Flags := Flags or Mouse_right; + Include(Flags, mkfMouseRight); if X_event.Xmotion.State and ShiftMask <> 0 then - Flags := Flags or Kbd_shift; + Include(Flags, mkfShift); if X_event.Xmotion.State and ControlMask <> 0 then - Flags := Flags or Kbd_ctrl; + Include(Flags, mkfCtrl); Cur_x := X_event.Xbutton.X; @@ -1719,8 +1707,8 @@ function TPlatformSupport.Run; if FControls.OnMouseMove(Cur_x, Cur_y, mkfMouseLeft in Flags) then begin - OnControlChange; - ForceRedraw; + OnControlChange(); + ForceRedraw(); end else if not FControls.InRect(Cur_x, Cur_y) then OnMouseMove(Cur_x, Cur_y, Flags); @@ -1728,19 +1716,19 @@ function TPlatformSupport.Run; ButtonRelease: begin - Flags := 0; + Flags := []; if X_event.Xbutton.State and ShiftMask <> 0 then - Flags := Flags or Kbd_shift; + Include(Flags, mkfShift); if X_event.Xbutton.State and ControlMask <> 0 then - Flags := Flags or Kbd_ctrl; + Include(Flags, mkfCtrl); if X_event.Xbutton.Button = Button1 then - Flags := Flags or Mouse_left; + Include(Flags, mkfMouseLeft); if X_event.Xbutton.Button = Button3 then - Flags := Flags or Mouse_right; + Include(Flags, mkfMouseRight); Cur_x := X_event.Xbutton.X; @@ -1752,19 +1740,18 @@ function TPlatformSupport.Run; if mkfMouseLeft in Flags then if FControls.OnMouseButtonUp(Cur_x, Cur_y) then begin - OnControlChange; - ForceRedraw; + OnControlChange(); + ForceRedraw(); end; - if Flags and (Mouse_left or Mouse_right) <> 0 then + if ((mkfMouseLeft in Flags) or (mkfMouseRight in Flags)) then OnMouseButtonUp(Cur_x, Cur_y, Flags); // FWaitMode:=FSpecific.FWaitMode; end; ClientMessage: - if (X_event.Xclient.Format = 32) and - (X_event.Xclient.Data.L[0] = Integer(FSpecific.FCloseAtom)) then + if (X_event.Xclient.Format = 32) and (X_event.Xclient.Data.L[0] = Integer(FSpecific.FCloseAtom)) then FQuit := True; end; end; @@ -1791,44 +1778,44 @@ function TPlatformSupport.Run; Result := 0; end; -procedure TPlatformSupport.Quit; +procedure TPlatformSupport.Quit(); begin FQuit := True; end; -function TPlatformSupport.GetPixelFormat; +function TPlatformSupport.GetPixelFormat(): TPixelFormat; begin Result := FPixelFormat; end; -function TPlatformSupport.GetFlipY; +function TPlatformSupport.GetFlipY(): Boolean; begin Result := FFlipY; end; -function TPlatformSupport.GetBitsPerPixel; +function TPlatformSupport.GetBitsPerPixel(): Cardinal; begin Result := FBitsPerPixel; end; -function TPlatformSupport.GetWaitMode; +function TPlatformSupport.GetWaitMode(): Boolean; begin Result := FWaitMode; end; -procedure TPlatformSupport.SetWaitMode; +procedure TPlatformSupport.SetWaitMode(WaitMode: Boolean); begin FWaitMode := WaitMode; end; -procedure TPlatformSupport.ForceRedraw; +procedure TPlatformSupport.ForceRedraw(); begin FSpecific.FUpdateFlag := True; end; -procedure TPlatformSupport.UpdateWindow; +procedure TPlatformSupport.UpdateWindow(); begin - FSpecific.Put_image(@FRenderingBufferWindow); + FSpecific.PutImage(FRenderingBufferWindow); // When FWaitMode is true we can discard all the events // came while the image is being drawn. In this case @@ -1838,48 +1825,48 @@ procedure TPlatformSupport.UpdateWindow; XSync(FSpecific.FDisplay, FWaitMode); end; -function TPlatformSupport.RenderingBufferWindow; +function TPlatformSupport.GetRenderingBufferWindow(): TAggRenderingBuffer; begin - Result := @FRenderingBufferWindow; + Result := FRenderingBufferWindow; end; -function TPlatformSupport.RenderingBufferImage; +function TPlatformSupport.GetRenderingBufferImage(Index: Cardinal): TAggRenderingBuffer; begin - Result := @FRenderingBufferImage[Index]; + Result := FRenderingBufferImage[Index]; end; -function TPlatformSupport.GetImageExtension; +function TPlatformSupport.GetImageExtension(): ShortString; begin Result := '.ppm'; end; -procedure TPlatformSupport.CopyImageToWindow; +procedure TPlatformSupport.CopyImageToWindow(Index: Cardinal); begin - if (Index < CMaxImages) and (RenderingBufferImage(Index).GetBuffer <> nil) then - RenderingBufferWindow.CopyFrom(RenderingBufferImage(Index)); + if (Index < CMaxImages) and (RenderingBufferImage[Index].Buffer <> nil) then + RenderingBufferWindow.CopyFrom(RenderingBufferImage[Index]); end; -procedure TPlatformSupport.CopyWindowToImage; +procedure TPlatformSupport.CopyWindowToImage(Index: Cardinal); begin if Index < CMaxImages then begin CreateImage(Index, RenderingBufferWindow.Width, RenderingBufferWindow.Height); - RenderingBufferImage(Index).CopyFrom(RenderingBufferWindow); + RenderingBufferImage[Index].CopyFrom(RenderingBufferWindow); end; end; -procedure TPlatformSupport.CopyImageToImage; +procedure TPlatformSupport.CopyImageToImage(IndexTo, IndexFrom: Cardinal); begin if (IndexFrom < CMaxImages) and (IndexTo < CMaxImages) and - (RenderingBufferImage(IndexFrom).GetBuffer <> nil) then + (RenderingBufferImage[IndexFrom].Buffer <> nil) then begin - CreateImage(IndexTo, RenderingBufferImage(IndexFrom).GetWidth, RenderingBufferImage(IndexFrom).GetHeight); + CreateImage(IndexTo, RenderingBufferImage[IndexFrom].Width, RenderingBufferImage[IndexFrom].Height); - RenderingBufferImage(IndexTo).CopyFrom(RenderingBufferImage(IndexFrom)); + RenderingBufferImage[IndexTo].CopyFrom(RenderingBufferImage[IndexFrom]); end; end; -procedure TPlatformSupport.OnInit; +procedure TPlatformSupport.OnInit(); begin end; @@ -1887,103 +1874,101 @@ procedure TPlatformSupport.OnResize(Width, Height: Integer); begin end; -procedure TPlatformSupport.OnIdle; +procedure TPlatformSupport.OnIdle(); begin end; -procedure TPlatformSupport.OnMouseMove(X, Y: Double; ButtonFlag: Boolean): Boolean; +procedure TPlatformSupport.OnMouseMove(X, Y: Integer; Flags: TMouseKeyboardFlags); begin end; -procedure TPlatformSupport.OnMouseButtonDown(X, Y: Double): Boolean; +procedure TPlatformSupport.OnMouseButtonDown(X, Y: Integer; Flags: TMouseKeyboardFlags); begin end; -procedure TPlatformSupport.OnMouseButtonUp(X, Y: Double): Boolean; +procedure TPlatformSupport.OnMouseButtonUp(X, Y: Integer; Flags: TMouseKeyboardFlags); begin end; -procedure TPlatformSupport.OnKey; +procedure TPlatformSupport.OnKey(X, Y: Integer; Key: Cardinal; Flags: TMouseKeyboardFlags); begin end; -procedure TPlatformSupport.OnControlChange; +procedure TPlatformSupport.OnControlChange(); begin end; -procedure TPlatformSupport.OnDraw; +procedure TPlatformSupport.OnDraw(); begin end; -procedure TPlatformSupport.OnPostDraw; +procedure TPlatformSupport.OnPostDraw(RawHandler: Pointer); begin end; -procedure TPlatformSupport.Add_ctrl; +procedure TPlatformSupport.AddControl(C: TAggCustomAggControl); begin FControls.Add(C); - C.Transform(@FResizeMatrix); + C.Transform(FResizeMatrix); end; -procedure TPlatformSupport.SetTransAffineResizing; +procedure TPlatformSupport.SetTransAffineResizing(AWidth, AHeight: Integer); var Vp: TAggTransViewport; Ts: TAggTransAffineScaling; begin - if FWindowFlags and wfKeepAspectRatio <> 0 then + + if (wfKeepAspectRatio in FWindowFlags) then begin - Vp.Create; + Vp:= TAggTransViewport.Create; Vp.PreserveAspectRatio(0.5, 0.5, arMeet); - Vp.DeviceViewport(0, 0, AWidth, AHeight); - Vp.WorldViewport(0, 0, FInitialWidth, GetInitialHeight); - - Vp.ToAffine(@FResizeMatrix); + Vp.WorldViewport(0, 0, FInitialWidth, GetInitialHeight()); + Vp.ToAffine(FResizeMatrix); end else begin - Ts.Create(AWidth / FInitialWidth, AHeight / GetInitialHeight); - - FResizeMatrix.Assign(@Ts); + Ts := TAggTransAffineScaling.Create(AWidth / GetInitialWidth(), AHeight / GetInitialHeight()); + FResizeMatrix.Assign(Ts); end; end; -function TPlatformSupport.GetTransAffineResizing; +function TPlatformSupport.GetTransAffineResizing(): TAggTransAffine; begin - Result := @FResizeMatrix; + Result := FResizeMatrix; end; -function TPlatformSupport.GetWidth; +function TPlatformSupport.GetWidth(): Double; begin Result := FRenderingBufferWindow.Width; end; -function TPlatformSupport.GetHeight; +function TPlatformSupport.GetHeight(): Double; begin Result := FRenderingBufferWindow.Height; end; -function TPlatformSupport.Initial_width; +function TPlatformSupport.GetInitialWidth(): Double; begin Result := FInitialWidth; end; -function TPlatformSupport.Initial_height; +function TPlatformSupport.GetInitialHeight(): Double; begin - Result := GetInitialHeight; + Result := FInitialHeight; end; -function TPlatformSupport.GetWindowFlags; +function TPlatformSupport.GetWindowFlags(): TWindowFlags; begin Result := FWindowFlags; end; -function TPlatformSupport.GetRawDisplayHandler; +function TPlatformSupport.GetRawDisplayHandler(): Pointer; begin end; -procedure TPlatformSupport.DisplayMessage; +procedure TPlatformSupport.DisplayMessage(Msg: PAnsiChar); const X_event_mask = ExposureMask or KeyPressMask; @@ -2029,8 +2014,7 @@ procedure TPlatformSupport.DisplayMessage; #13: begin XDrawString(X_display, X_window, X_gc, 10, Y, Str, Len); - XQueryTextExtents(X_display, XGContextFromGC(X_gc), Str, Len, - @Font_dir, @Font_ascent, @Font_descent, @Font_str); + XQueryTextExtents(X_display, XGContextFromGC(X_gc), Str, Len, @Font_dir, @Font_ascent, @Font_descent, @Font_str); Inc(Y, Font_str.Ascent + Font_str.Descent + Plus); Inc(X_dy, Font_str.Ascent + Font_str.Descent + Plus); @@ -2055,8 +2039,7 @@ procedure TPlatformSupport.DisplayMessage; if Len > 0 then begin XDrawString(X_display, X_window, X_gc, 10, Y, Str, Len); - XQueryTextExtents(X_display, XGContextFromGC(X_gc), Str, Len, @Font_dir, - @Font_ascent, @Font_descent, @Font_str); + XQueryTextExtents(X_display, XGContextFromGC(X_gc), Str, Len, @Font_dir, @Font_ascent, @Font_descent, @Font_str); Inc(X_dy, Font_str.Ascent + Font_str.Descent + Plus); @@ -2072,8 +2055,7 @@ procedure TPlatformSupport.DisplayMessage; if X_display <> nil then begin - X_window := XCreateSimpleWindow(X_display, XDefaultRootWindow(X_display), - 50, 50, 550, 300, 0, 0, 255 + (255 shl 8) + (255 shl 16)); + X_window := XCreateSimpleWindow(X_display, XDefaultRootWindow(X_display), 50, 50, 550, 300, 0, 0, 255 + (255 shl 8) + (255 shl 16)); X_gc := XCreateGC(X_display, X_window, 0, 0); @@ -2155,12 +2137,12 @@ procedure TPlatformSupport.DisplayMessage; Writeln(Stderr, Msg); end; -procedure TPlatformSupport.StartTimer; +procedure TPlatformSupport.StartTimer(); begin FSpecific.FSwStart := Clock; end; -function TPlatformSupport.Elapsed_time; +function TPlatformSupport.GetElapsedTime(): Double; var Stop: Clock_t; begin @@ -2169,12 +2151,12 @@ function TPlatformSupport.Elapsed_time; Result := (Stop - FSpecific.FSwStart) * 1000.0 / CLOCKS_PER_SEC; end; -function TPlatformSupport.Full_file_name; +function TPlatformSupport.FullFileName(FileName: ShortString): ShortString; begin Result := FileName; end; -function TPlatformSupport.FileSource; +function TPlatformSupport.FileSource(Path, FName: ShortString): ShortString; var F: file; E: Integer;