Changeset 522 for GraphicTest/Packages/Graphics32/GR32_Backends.pas
- Timestamp:
- Apr 17, 2019, 10:42:18 AM (5 years ago)
- Location:
- GraphicTest/Packages/Graphics32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Packages/Graphics32
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
GraphicTest/Packages/Graphics32/GR32_Backends.pas
r450 r522 44 44 Windows, Messages, Controls, Graphics, 45 45 {$ENDIF} 46 Classes, SysUtils, GR32, GR32_Containers, GR32_Image ;46 Classes, SysUtils, GR32, GR32_Containers, GR32_Image, GR32_Paths; 47 47 48 48 type 49 EBackend = class(Exception); 50 49 51 ITextSupport = interface(IUnknown) 50 52 ['{225997CC-958A-423E-8B60-9EDE0D3B53B5}'] … … 70 72 property Font: TFont read GetFont write SetFont; 71 73 property OnFontChange: TNotifyEvent read GetOnFontChange write SetOnFontChange; 74 end; 75 76 ITextToPathSupport = interface(IUnknown) 77 ['{6C4037E4-FF4D-4EE2-9C20-B9DB9C64B42D}'] 78 procedure TextToPath(Path: TCustomPath; const X, Y: TFloat; const Text: WideString); overload; 79 procedure TextToPath(Path: TCustomPath; const DstRect: TFloatRect; const Text: WideString; Flags: Cardinal); overload; 80 function MeasureText(const DstRect: TFloatRect; const Text: WideString; Flags: Cardinal): TFloatRect; 72 81 end; 73 82 … … 130 139 implementation 131 140 132 uses133 GR32_LowLevel;134 135 141 procedure RequireBackendSupport(TargetBitmap: TCustomBitmap32; 136 142 RequiredInterfaces: array of TGUID; … … 159 165 // TODO: Try to find a back-end that supports the required interfaces 160 166 // instead of resorting to the default platform back-end class... 161 TargetBitmap.Backend := GetPlatformBackendClass.Create;167 TargetBitmap.Backend := TargetBitmap.GetPlatformBackendClass.Create; 162 168 end 163 169 else
Note:
See TracChangeset
for help on using the changeset viewer.