Skip to content

Commit 049153b

Browse files
Version 1.2
Added support and built with Delphi 11 Added new version of Image32 Library
1 parent 496993a commit 049153b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+6128
-5433
lines changed

Build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
call "C:\BDS\Studio\21.0\bin\rsvars.bat"
1+
call "C:\BDS\Studio\22.0\bin\rsvars.bat"
22
msbuild.exe "Source\MDShellExtensions.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=release
33
msbuild.exe "Source\MDShellExtensions32.dproj" /target:Clean;Build /p:Platform=Win32 /p:config=release
44
msbuild.exe "Source\MDTextEditor.dproj" /target:Clean;Build /p:Platform=Win64 /p:config=release

Ext/SVGIconImageList/Image32/source/Image32_CQ.pas renamed to Ext/SVGIconImageList/Image32/source/Img32.CQ.pas

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
unit Image32_CQ;
1+
unit Img32.CQ;
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 2.0 *
6-
* Date : 6 March 2021 *
5+
* Version : 3.1 *
6+
* Date : 15 August 2021 *
77
* Website : http://www.angusj.com *
88
* Copyright : Angus Johnson 2019-2021 *
99
* Purpose : Color reduction for TImage32 *
@@ -13,11 +13,11 @@
1313

1414
interface
1515

16-
{$I Image32.inc}
16+
{$I Img32.inc}
1717

1818
uses
1919
{$IFDEF MSWINDOWS} Windows,{$ENDIF}
20-
SysUtils, Classes, Math, Image32, Image32_Vector;
20+
SysUtils, Classes, Types, Math, Img32, Img32.Vector;
2121

2222
function MakePalette(image: TImage32;
2323
MaxColors: integer): TArrayOfColor32; overload;
@@ -947,13 +947,13 @@ procedure DrawPalette(image: TImage32; const palette: TArrayOfColor32);
947947
if len < 16 then w := len else w := 16;
948948
h := (len +15) div 16;
949949
image.SetSize(w * 16, h * 16);
950-
rec := Image32_Vector.Rect(0,0,16,16);
950+
rec := Img32.Vector.Rect(0,0,16,16);
951951
for i := 0 to len -1 do
952952
begin
953953
image.FillRect(rec, palette[i] or $FF000000);
954954
if (i + 1) mod w = 0 then
955-
OffsetRect(rec, -15 * w, 16) else
956-
OffsetRect(rec, 16, 0);
955+
Types.OffsetRect(rec, -15 * w, 16) else
956+
Types.OffsetRect(rec, 16, 0);
957957
end;
958958
end;
959959

@@ -1016,7 +1016,7 @@ procedure MakeDitherTables;
10161016
img := TImage32.Create(i * 16, 16);
10171017
for i := 0 to i -1 do
10181018
DrawPolygon(img, Rectangle(i * 16, 0, (i +1) * 16, 16),
1019-
Image32_Vector.frEvenOdd, pal[i]);
1019+
Img32.Vector.frEvenOdd, pal[i]);
10201020
img.SaveToFile('tmp.png');
10211021
img.Free;
10221022
*)

Ext/SVGIconImageList/Image32/source/Image32_Clipper.pas renamed to Ext/SVGIconImageList/Image32/source/Img32.Clipper.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
unit Image32_Clipper;
1+
unit Img32.Clipper;
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
@@ -14,7 +14,7 @@ interface
1414

1515
uses
1616
ClipperCore, Clipper, ClipperOffset,
17-
Image32, Image32_Draw, Image32_Vector;
17+
Img32, Img32.Draw, Img32.Vector;
1818

1919
//nb: InflatePath assumes that there's consistent winding where
2020
//outer paths wind in one direction and inner paths in the other

Ext/SVGIconImageList/Image32/source/Image32_Draw.pas renamed to Ext/SVGIconImageList/Image32/source/Img32.Draw.pas

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
unit Image32_Draw;
1+
unit Img32.Draw;
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 2.25 *
6-
* Date : 30 June 2021 *
5+
* Version : 3.1 *
6+
* Date : 15 August 2021 *
77
* Website : http://www.angusj.com *
88
* Copyright : Angus Johnson 2019-2021 *
99
* *
@@ -16,16 +16,16 @@
1616

1717
interface
1818

19-
{$I Image32.inc}
19+
{$I Img32.inc}
2020

2121
{.$DEFINE MemCheck} //for debugging only (adds a minimal cost to performance)
2222

2323
uses
24-
SysUtils, Classes, Types, Math, Image32, Image32_Vector,
25-
Image32_Transform; //experimental;
24+
SysUtils, Classes, Types, Math, Img32, Img32.Vector,
25+
Img32.Transform; //experimental;
2626

2727
type
28-
TFillRule = Image32_Vector.TFillRule;
28+
TFillRule = Img32.Vector.TFillRule;
2929

3030
//TGradientColor: used internally by both
3131
//TLinearGradientRenderer and TRadialGradientRenderer
@@ -280,9 +280,9 @@ TBarycentricRenderer = class(TCustomRenderer)
280280

281281
//Both DrawBoolMask and DrawAlphaMask require
282282
//'mask' length to equal 'img' width * height
283-
procedure DrawBoolMask(img: TIMage32;
283+
procedure DrawBoolMask(img: TImage32;
284284
const mask: TArrayOfByte; color: TColor32 = clBlack32);
285-
procedure DrawAlphaMask(img: TIMage32;
285+
procedure DrawAlphaMask(img: TImage32;
286286
const mask: TArrayOfByte; color: TColor32 = clBlack32);
287287

288288
procedure Rasterize(const paths: TPathsD;
@@ -292,7 +292,7 @@ implementation
292292

293293
{$IFDEF MemCheck}
294294
resourcestring
295-
sMemCheckError = 'Image32_Draw: Memory allocation error';
295+
sMemCheckError = 'Img32.Draw: Memory allocation error';
296296
{$ENDIF}
297297

298298
type
@@ -341,7 +341,7 @@ procedure ApplyClearType(img: TImage32;
341341
begin
342342
// Precondition: the background to text drawn onto 'img' must be transparent
343343

344-
// multiplication tables (see Image32.pas)
344+
// multiplication tables (see Img32.pas)
345345
// 85 + (2 * 57) + (2 * 28) == 255
346346
primeTbl := PByteArray(@MulTable[85 + centerWeighting *2]);
347347
nearTbl := PByteArray(@MulTable[57]);
@@ -961,7 +961,7 @@ procedure Rasterize(const paths: TPathsD; const clipRec: TRect;
961961
begin
962962
//See also https://nothings.org/gamedev/rasterize/
963963
if not assigned(renderer) then Exit;
964-
clipRec2 := Image32_Vector.IntersectRect(clipRec, GetBounds(paths));
964+
Types.IntersectRect(clipRec2, clipRec, GetBounds(paths));
965965
if IsEmptyRect(clipRec2) then Exit;
966966

967967
paths2 := OffsetPath(paths, -clipRec2.Left, -clipRec2.Top);
@@ -1732,6 +1732,7 @@ procedure DrawLine(img: TImage32; const lines: TPathsD;
17321732
if not assigned(lines) then exit;
17331733
if (lineWidth < MinStrokeWidth) then lineWidth := MinStrokeWidth;
17341734
lines2 := Outline(lines, lineWidth, joinStyle, endStyle, miterLimit);
1735+
17351736
cr := TColorRenderer.Create(color);
17361737
try
17371738
if cr.Initialize(img) then
@@ -2026,7 +2027,7 @@ procedure ErasePolygon(img: TImage32; const polygons: TPathsD;
20262027
end;
20272028
//------------------------------------------------------------------------------
20282029

2029-
procedure DrawBoolMask(img: TIMage32; const mask: TArrayOfByte; color: TColor32);
2030+
procedure DrawBoolMask(img: TImage32; const mask: TArrayOfByte; color: TColor32);
20302031
var
20312032
i, len: integer;
20322033
pc: PColor32;
@@ -2050,7 +2051,7 @@ procedure DrawBoolMask(img: TIMage32; const mask: TArrayOfByte; color: TColor32)
20502051
end;
20512052
//------------------------------------------------------------------------------
20522053

2053-
procedure DrawAlphaMask(img: TIMage32; const mask: TArrayOfByte; color: TColor32);
2054+
procedure DrawAlphaMask(img: TImage32; const mask: TArrayOfByte; color: TColor32);
20542055
var
20552056
i, len: integer;
20562057
pc: PColor32;

0 commit comments

Comments
 (0)