skia: icon
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9342 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
ea8eb141c2
commit
089bb3babb
3
components/skia/design/README.txt
Normal file
3
components/skia/design/README.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Skia.LCL.Design.res was created with:
|
||||||
|
|
||||||
|
lazarus/tools/lazres Skia.LCL.Design.res icons/*
|
@ -7,7 +7,7 @@
|
|||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="IDE addon to install LCL components for Skia in Lazarus, requires FPC 3.3.1+"/>
|
<Description Value="IDE addon to install LCL components for Skia in Lazarus, requires FPC 3.3.1+"/>
|
||||||
@ -23,9 +23,7 @@
|
|||||||
<RequiredPkgs>
|
<RequiredPkgs>
|
||||||
<Item>
|
<Item>
|
||||||
<PackageName Value="Skia.LCL"/>
|
<PackageName Value="Skia.LCL"/>
|
||||||
</Item>
|
<DefaultFilename Value="../src/skia.lcl.lpk" Prefer="True"/>
|
||||||
<Item>
|
|
||||||
<PackageName Value="FCL"/>
|
|
||||||
</Item>
|
</Item>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
|
22
components/skia/design/Skia.LCL.Design.pas
Normal file
22
components/skia/design/Skia.LCL.Design.pas
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ This file was automatically created by Lazarus. Do not edit!
|
||||||
|
This source is only used to compile and install the package.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit Skia.LCL.Design;
|
||||||
|
|
||||||
|
{$warn 5023 off : no warning about unused units}
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SkiaLCLRegister, LazarusPackageIntf;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
begin
|
||||||
|
RegisterUnit('SkiaLCLRegister', @SkiaLCLRegister.Register);
|
||||||
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
RegisterPackage('Skia.LCL.Design', @Register);
|
||||||
|
end.
|
BIN
components/skia/design/Skia.LCL.Design.res
Normal file
BIN
components/skia/design/Skia.LCL.Design.res
Normal file
Binary file not shown.
@ -8,12 +8,14 @@ unit SkiaLCLRegister;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCL.Skia;
|
LCL.Skia, classes;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
{$R Skia.LCL.Design.res}
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
RegisterComponents('Skia', [TSkPaintBox]);
|
RegisterComponents('Skia', [TSkPaintBox]);
|
||||||
|
BIN
components/skia/design/icons/tskpaintbox.png
Normal file
BIN
components/skia/design/icons/tskpaintbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 997 B |
BIN
components/skia/design/icons/tskpaintbox_150.png
Normal file
BIN
components/skia/design/icons/tskpaintbox_150.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
components/skia/design/icons/tskpaintbox_200.png
Normal file
BIN
components/skia/design/icons/tskpaintbox_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
@ -48,7 +48,6 @@ type
|
|||||||
property DrawCacheKind: TSkDrawCacheKind read FDrawCacheKind write SetDrawCacheKind default TSkDrawCacheKind.Raster;
|
property DrawCacheKind: TSkDrawCacheKind read FDrawCacheKind write SetDrawCacheKind default TSkDrawCacheKind.Raster;
|
||||||
property OnDraw: TSkDrawEvent read FOnDraw write SetOnDraw;
|
property OnDraw: TSkDrawEvent read FOnDraw write SetOnDraw;
|
||||||
public
|
public
|
||||||
class function GetControlClassDefaultSize: TSize; override;
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Redraw; virtual;
|
procedure Redraw; virtual;
|
||||||
@ -60,7 +59,10 @@ type
|
|||||||
{ TSkPaintBox }
|
{ TSkPaintBox }
|
||||||
|
|
||||||
TSkPaintBox = class(TSkCustomControl)
|
TSkPaintBox = class(TSkCustomControl)
|
||||||
|
protected
|
||||||
|
class function GetControlClassDefaultSize: TSize; override;
|
||||||
public
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
property DrawCacheKind;
|
property DrawCacheKind;
|
||||||
published
|
published
|
||||||
property Align;
|
property Align;
|
||||||
@ -505,12 +507,6 @@ begin
|
|||||||
inherited Resize;
|
inherited Resize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TSkCustomControl.GetControlClassDefaultSize: TSize;
|
|
||||||
begin
|
|
||||||
Result.CX := 50;
|
|
||||||
Result.CY := 50;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TSkCustomControl.Create(AOwner: TComponent);
|
constructor TSkCustomControl.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
@ -538,6 +534,22 @@ begin
|
|||||||
inherited Invalidate;
|
inherited Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TSkPaintBox }
|
||||||
|
|
||||||
|
class function TSkPaintBox.GetControlClassDefaultSize: TSize;
|
||||||
|
begin
|
||||||
|
Result.CX := 50;
|
||||||
|
Result.CY := 50;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TSkPaintBox.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner);
|
||||||
|
ControlStyle := ControlStyle + [csReplicatable];
|
||||||
|
with GetControlClassDefaultSize do
|
||||||
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TSkSvgBrush }
|
{ TSkSvgBrush }
|
||||||
|
|
||||||
function TSkSvgBrush.GetDOM: ISkSVGDOM;
|
function TSkSvgBrush.GetDOM: ISkSVGDOM;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<RequiredPkgs>
|
<RequiredPkgs>
|
||||||
<Item>
|
<Item>
|
||||||
<PackageName Value="Skia"/>
|
<PackageName Value="Skia"/>
|
||||||
|
<DefaultFilename Value="../skia4d_package/Skia.lpk"/>
|
||||||
</Item>
|
</Item>
|
||||||
<Item>
|
<Item>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user