summaryrefslogtreecommitdiff
path: root/packages/fcl-image
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
commit160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch)
treeb791a95695a7cf674e61a6153139c6f9c6c491fa /packages/fcl-image
parent3843727e74b31bbf2a34e7e3b89ee422269f770e (diff)
parent413a6aa6469e6c297780217a27ca91363c637944 (diff)
downloadfpc-160cc1e115eeb75638dce6effdd16b2bc810ddb4.tar.gz
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-image')
-rw-r--r--packages/fcl-image/Makefile36
-rw-r--r--packages/fcl-image/Makefile.fpc1
-rw-r--r--packages/fcl-image/src/fpcanvas.inc69
-rw-r--r--packages/fcl-image/src/fpcanvas.pp21
-rw-r--r--packages/fcl-image/src/fpfont.inc11
5 files changed, 134 insertions, 4 deletions
diff --git a/packages/fcl-image/Makefile b/packages/fcl-image/Makefile
index 46987dec8b..66a18b59ab 100644
--- a/packages/fcl-image/Makefile
+++ b/packages/fcl-image/Makefile
@@ -1,8 +1,8 @@
#
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2010/09/29]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/03/21]
#
default: all
-MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
+MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx haiku
LIMIT83fs = go32v2 os2 emx watcom
@@ -377,6 +377,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
@@ -402,7 +405,7 @@ ifeq ($(FULL_TARGET),x86_64-darwin)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
+override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd freetypeh freetype ftfont
endif
ifeq ($(FULL_TARGET),x86_64-embedded)
override TARGET_UNITS+=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm clipping fpcanvas pixtools fppixlcanv fpimgcanv pscanvas fpwritebmp fpreadbmp bmpcomn fpreadpnm fpwritepnm fpreadjpeg fpwritejpeg pcxcomn fpreadpcx fpwritepcx fptiffcmn fpreadtiff fpwritetiff targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
@@ -563,6 +566,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_RSTS+=pscanvas
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_RSTS+=pscanvas
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_RSTS+=pscanvas
endif
@@ -749,6 +755,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override TARGET_EXAMPLEDIRS+=examples
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override TARGET_EXAMPLEDIRS+=examples
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_EXAMPLEDIRS+=examples
endif
@@ -936,6 +945,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_OPTIONS+=-S2h
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_OPTIONS+=-S2h
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_OPTIONS+=-S2h
endif
@@ -1122,6 +1134,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
override COMPILER_SOURCEDIR+=src
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+override COMPILER_SOURCEDIR+=src
+endif
ifeq ($(FULL_TARGET),sparc-linux)
override COMPILER_SOURCEDIR+=src
endif
@@ -1543,6 +1558,11 @@ ifeq ($(OS_TARGET),NativeNT)
SHAREDLIBEXT=.dll
SHORTSUFFIX=nativent
endif
+ifeq ($(OS_TARGET),wii)
+EXEEXT=.dol
+SHAREDLIBEXT=.so
+SHORTSUFFIX=wii
+endif
else
ifeq ($(OS_TARGET),go32v1)
PPUEXT=.pp1
@@ -2230,6 +2250,13 @@ REQUIRE_PACKAGES_HASH=1
REQUIRE_PACKAGES_PASZLIB=1
REQUIRE_PACKAGES_FCL-BASE=1
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+REQUIRE_PACKAGES_RTL=1
+REQUIRE_PACKAGES_PASJPEG=1
+REQUIRE_PACKAGES_HASH=1
+REQUIRE_PACKAGES_PASZLIB=1
+REQUIRE_PACKAGES_FCL-BASE=1
+endif
ifeq ($(FULL_TARGET),sparc-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_PASJPEG=1
@@ -3268,6 +3295,9 @@ endif
ifeq ($(FULL_TARGET),powerpc-embedded)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
+ifeq ($(FULL_TARGET),powerpc-wii)
+TARGET_EXAMPLEDIRS_EXAMPLES=1
+endif
ifeq ($(FULL_TARGET),sparc-linux)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
diff --git a/packages/fcl-image/Makefile.fpc b/packages/fcl-image/Makefile.fpc
index ba1fa87890..391e22119c 100644
--- a/packages/fcl-image/Makefile.fpc
+++ b/packages/fcl-image/Makefile.fpc
@@ -14,6 +14,7 @@ units=fpimgcmn fpimage pngcomn fpreadpng fpwritepng fpreadxpm fpwritexpm \
targacmn fpreadtga fpwritetga ellipses fpcolhash fpditherer fpquantizer \
extinterpolation fpreadgif fpreadpsd xwdfile fpreadxwd
units_win32=freetypeh freetype ftfont
+units_win64=freetypeh freetype ftfont
units_beos=freetypeh freetype ftfont
units_haiku=freetypeh freetype ftfont
units_linux=freetypeh freetype ftfont
diff --git a/packages/fcl-image/src/fpcanvas.inc b/packages/fcl-image/src/fpcanvas.inc
index 99784a8e8d..b3729fb5c3 100644
--- a/packages/fcl-image/src/fpcanvas.inc
+++ b/packages/fcl-image/src/fpcanvas.inc
@@ -402,6 +402,56 @@ begin
FPenPos := points[high(points)];
end;
+procedure TFPCustomCanvas.RadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+
+begin
+ DoRadialPie(X1, y1, x2, y2, StartAngle16Deg, Angle16DegLength);
+end;
+
+procedure TFPCustomCanvas.DoRadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+
+begin
+ // To be implemented
+end;
+
+procedure TFPCustomCanvas.DoPolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+
+begin
+ // To be implemented
+end;
+
+procedure TFPCustomCanvas.PolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+begin
+ DoPolyBezier(Points,NumPts,Filled,Continuous);
+end;
+
+procedure TFPCustomCanvas.PolyBezier(const Points: array of TPoint;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+var
+ NPoints{, i}: integer;
+// PointArray: ^TPoint;
+begin
+ NPoints:=High(Points)-Low(Points)+1;
+ if NPoints>0 then
+ DoPolyBezier(@Points[Low(Points)],NPoints,Filled,Continuous);
+{
+ NPoints:=High(Points)-Low(Points)+1;
+ if NPoints<=0 then exit;
+ GetMem(PointArray,SizeOf(TPoint)*NPoints);
+ try
+ for i:=0 to NPoints-1 do
+ PointArray[i]:=Points[i+Low(Points)];
+ DoPolyBezier(PointArray, NPoints, Filled, Continuous);
+ finally
+ FreeMem(PointArray);
+ end;}
+end;
+
procedure TFPCustomCanvas.Clear;
var r : TRect;
begin
@@ -500,6 +550,25 @@ begin
Rectangle (Rect(left,top,right,bottom));
end;
+procedure TFPCustomCanvas.FillRect(const ARect: TRect);
+
+begin
+ if (Brush.style <> bsClear) then
+ begin
+ if not (brush is TFPCustomDrawBrush) then
+ DoRectangleFill (ARect)
+ else
+ with ARect do
+ TFPCustomDrawBrush(Brush).Rectangle (left,top,right,bottom);
+ end;
+end;
+
+procedure TFPCustomCanvas.FillRect(X1,Y1,X2,Y2: Integer);
+
+begin
+ FillRect (Rect(X1,Y1,X2,Y2));
+end;
+
procedure TFPCustomCanvas.Rectangle (const Bounds:TRect);
var np,nb,dp,db,pb : boolean;
begin
diff --git a/packages/fcl-image/src/fpcanvas.pp b/packages/fcl-image/src/fpcanvas.pp
index 6c82cae7f7..c9ca814463 100644
--- a/packages/fcl-image/src/fpcanvas.pp
+++ b/packages/fcl-image/src/fpcanvas.pp
@@ -24,6 +24,7 @@ const
type
+ PPoint = ^TPoint;
TFPCanvasException = class (Exception);
TFPPenException = class (TFPCanvasException);
TFPBrushException = class (TFPCanvasException);
@@ -82,11 +83,14 @@ type
TFPCustomFont = class (TFPCanvasHelper)
private
FName : string;
+ FOrientation,
FSize : integer;
protected
procedure DoCopyProps (From:TFPCanvasHelper); override;
procedure SetName (AValue:string); virtual;
procedure SetSize (AValue:integer); virtual;
+ procedure SetOrientation (AValue:integer); virtual;
+ function GetOrientation : Integer;
public
function CopyFont : TFPCustomFont;
// Creates a copy of the font with all properties the same, but not allocated
@@ -99,6 +103,8 @@ type
property Italic : boolean index 6 read GetFlags write SetFlags;
property Underline : boolean index 7 read GetFlags write SetFlags;
property StrikeTrough : boolean index 8 read GetFlags write SetFlags;
+ property Orientation: Integer read GetOrientation write SetOrientation default 0;
+
end;
TFPCustomFontClass = class of TFPCustomFont;
@@ -255,6 +261,10 @@ type
procedure DoLine (x1,y1,x2,y2:integer); virtual; abstract;
procedure DoCopyRect (x,y:integer; canvas:TFPCustomCanvas; Const SourceRect:TRect); virtual; abstract;
procedure DoDraw (x,y:integer; Const image:TFPCustomImage); virtual; abstract;
+ procedure DoRadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer); virtual;
+ procedure DoPolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False); virtual;
procedure CheckHelper (AHelper:TFPCanvasHelper); virtual;
procedure AddHelper (AHelper:TFPCanvasHelper);
public
@@ -277,8 +287,17 @@ type
procedure EllipseC (x,y:integer; rx,ry:longword);
procedure Polygon (Const points:array of TPoint);
procedure Polyline (Const points:array of TPoint);
- procedure Rectangle (Const Bounds:TRect);
+ procedure RadialPie(x1, y1, x2, y2, StartAngle16Deg, Angle16DegLength: Integer);
+ procedure PolyBezier(Points: PPoint; NumPts: Integer;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+ procedure PolyBezier(const Points: array of TPoint;
+ Filled: boolean = False;
+ Continuous: boolean = False);
+ procedure Rectangle (Const Bounds : TRect);
procedure Rectangle (left,top,right,bottom:integer);
+ procedure FillRect(const ARect: TRect);
+ procedure FillRect(X1,Y1,X2,Y2: Integer);
// using brush
procedure FloodFill (x,y:integer);
procedure Clear;
diff --git a/packages/fcl-image/src/fpfont.inc b/packages/fcl-image/src/fpfont.inc
index a63f435fb6..b61c78a448 100644
--- a/packages/fcl-image/src/fpfont.inc
+++ b/packages/fcl-image/src/fpfont.inc
@@ -24,6 +24,17 @@ begin
FSize := AValue;
end;
+procedure TFPCustomFont.SetOrientation (AValue:integer);
+begin
+ FOrientation := AValue;
+end;
+
+function TFPCustomFont.GetOrientation : Integer;
+begin
+ Result := FOrientation;
+end;
+
+
procedure TFPCustomFont.DoCopyProps (From:TFPCanvasHelper);
begin
with from as TFPCustomFont do