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:
mgaertner 2024-04-25 09:10:00 +00:00
parent ea8eb141c2
commit 089bb3babb
10 changed files with 50 additions and 12 deletions

View File

@ -0,0 +1,3 @@
Skia.LCL.Design.res was created with:
lazarus/tools/lazres Skia.LCL.Design.res icons/*

View File

@ -7,7 +7,7 @@
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Description Value="IDE addon to install LCL components for Skia in Lazarus, requires FPC 3.3.1+"/>
@ -23,9 +23,7 @@
<RequiredPkgs>
<Item>
<PackageName Value="Skia.LCL"/>
</Item>
<Item>
<PackageName Value="FCL"/>
<DefaultFilename Value="../src/skia.lcl.lpk" Prefer="True"/>
</Item>
</RequiredPkgs>
<UsageOptions>

View 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.

Binary file not shown.

View File

@ -8,12 +8,14 @@ unit SkiaLCLRegister;
interface
uses
LCL.Skia;
LCL.Skia, classes;
procedure Register;
implementation
{$R Skia.LCL.Design.res}
procedure Register;
begin
RegisterComponents('Skia', [TSkPaintBox]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -48,7 +48,6 @@ type
property DrawCacheKind: TSkDrawCacheKind read FDrawCacheKind write SetDrawCacheKind default TSkDrawCacheKind.Raster;
property OnDraw: TSkDrawEvent read FOnDraw write SetOnDraw;
public
class function GetControlClassDefaultSize: TSize; override;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Redraw; virtual;
@ -60,7 +59,10 @@ type
{ TSkPaintBox }
TSkPaintBox = class(TSkCustomControl)
protected
class function GetControlClassDefaultSize: TSize; override;
public
constructor Create(AOwner: TComponent); override;
property DrawCacheKind;
published
property Align;
@ -505,12 +507,6 @@ begin
inherited Resize;
end;
class function TSkCustomControl.GetControlClassDefaultSize: TSize;
begin
Result.CX := 50;
Result.CY := 50;
end;
constructor TSkCustomControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
@ -538,6 +534,22 @@ begin
inherited Invalidate;
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 }
function TSkSvgBrush.GetDOM: ISkSVGDOM;

View File

@ -29,6 +29,7 @@
<RequiredPkgs>
<Item>
<PackageName Value="Skia"/>
<DefaultFilename Value="../skia4d_package/Skia.lpk"/>
</Item>
<Item>
<PackageName Value="LCL"/>