mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 07:21:02 +00:00
Change DPS/PS functions to CGFloat and NSInteger.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@36063 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
255ee1a3d8
commit
fefa08c1b7
16 changed files with 350 additions and 350 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2013-02-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/gsc/GSGState.h
|
||||
* Headers/gsc/GSGStateOps.h
|
||||
* Headers/gsc/GSStreamGState.h
|
||||
* Source/art/ARTGState.m
|
||||
* Source/art/composite.m
|
||||
* Source/art/ftfont-old.m
|
||||
* Source/art/ftfont.h
|
||||
* Source/art/ftfont.m
|
||||
* Source/art/path.m
|
||||
* Source/cairo/CairoGState.m
|
||||
* Source/gsc/GSContext.m
|
||||
* Source/gsc/GSGState.m
|
||||
* Source/gsc/GSStreamContext.m
|
||||
* Source/winlib/WIN32GState.m
|
||||
* Source/xlib/XGGState.m: Adopt to CGFloat changes in DPS/PS
|
||||
functions of gui.
|
||||
|
||||
2013-02-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/cairo/CairoGState.m
|
||||
|
|
|
@ -65,7 +65,7 @@ typedef enum {
|
|||
color_state_t cstate; /* state last time color was set */
|
||||
NSImage *pattern; /* If set, image to draw with */
|
||||
|
||||
float charSpacing;
|
||||
CGFloat charSpacing;
|
||||
NSAffineTransform *textCtm; /* Text transform - concat with ctm */
|
||||
GSTextDrawingMode textMode;
|
||||
BOOL viewIsFlipped;
|
||||
|
@ -88,13 +88,13 @@ typedef enum {
|
|||
- (void) dissolveGState: (GSGState *)source
|
||||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
delta: (float)delta;
|
||||
delta: (CGFloat)delta;
|
||||
|
||||
- (void) compositeGState: (GSGState *)source
|
||||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
|
||||
- (void) compositerect: (NSRect)aRect
|
||||
op: (NSCompositingOperation)op;
|
||||
|
@ -112,7 +112,7 @@ graphics state with arbitrary transforms on the current graphics context. */
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta;
|
||||
fraction: (CGFloat)delta;
|
||||
@end
|
||||
|
||||
#include "GSGStateOps.h"
|
||||
|
|
|
@ -33,16 +33,16 @@
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Color operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPScurrentalpha: (float*)a;
|
||||
- (void) DPScurrentcmykcolor: (float*)c : (float*)m : (float*)y : (float*)k;
|
||||
- (void) DPScurrentgray: (float*)gray;
|
||||
- (void) DPScurrenthsbcolor: (float*)h : (float*)s : (float*)b;
|
||||
- (void) DPScurrentrgbcolor: (float*)r : (float*)g : (float*)b;
|
||||
- (void) DPSsetalpha: (float)a;
|
||||
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k;
|
||||
- (void) DPSsetgray: (float)gray;
|
||||
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b;
|
||||
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b;
|
||||
- (void) DPScurrentalpha: (CGFloat*)a;
|
||||
- (void) DPScurrentcmykcolor: (CGFloat*)c : (CGFloat*)m : (CGFloat*)y : (CGFloat*)k;
|
||||
- (void) DPScurrentgray: (CGFloat*)gray;
|
||||
- (void) DPScurrenthsbcolor: (CGFloat*)h : (CGFloat*)s : (CGFloat*)b;
|
||||
- (void) DPScurrentrgbcolor: (CGFloat*)r : (CGFloat*)g : (CGFloat*)b;
|
||||
- (void) DPSsetalpha: (CGFloat)a;
|
||||
- (void) DPSsetcmykcolor: (CGFloat)c : (CGFloat)m : (CGFloat)y : (CGFloat)k;
|
||||
- (void) DPSsetgray: (CGFloat)gray;
|
||||
- (void) DPSsethsbcolor: (CGFloat)h : (CGFloat)s : (CGFloat)b;
|
||||
- (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b;
|
||||
|
||||
- (void) GSSetFillColorspace: (void *)spaceref;
|
||||
- (void) GSSetStrokeColorspace: (void *)spaceref;
|
||||
|
@ -52,21 +52,21 @@
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Text operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSashow: (float)x : (float)y : (const char*)s;
|
||||
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay
|
||||
: (const char*)s;
|
||||
- (void) DPSashow: (CGFloat)x : (CGFloat)y : (const char*)s;
|
||||
- (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c
|
||||
: (CGFloat)ax : (CGFloat)ay : (const char*)s;
|
||||
- (void) DPScharpath: (const char*)s : (int)b;
|
||||
- (void) appendBezierPathWithPackedGlyphs: (const char *)packedGlyphs
|
||||
path: (NSBezierPath*)aPath;
|
||||
- (void) DPSshow: (const char*)s;
|
||||
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char*)s;
|
||||
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size;
|
||||
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size;
|
||||
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size;
|
||||
- (void) DPSwidthshow: (CGFloat)x : (CGFloat)y : (int)c : (const char*)s;
|
||||
- (void) DPSxshow: (const char*)s : (const CGFloat*)numarray : (int)size;
|
||||
- (void) DPSxyshow: (const char*)s : (const CGFloat*)numarray : (int)size;
|
||||
- (void) DPSyshow: (const char*)s : (const CGFloat*)numarray : (int)size;
|
||||
|
||||
- (void) GSSetCharacterSpacing: (float)extra;
|
||||
- (void) GSSetCharacterSpacing: (CGFloat)extra;
|
||||
- (void) GSSetFont: (GSFontInfo *)fontref;
|
||||
- (void) GSSetFontSize: (float)size;
|
||||
- (void) GSSetFontSize: (CGFloat)size;
|
||||
- (NSAffineTransform *) GSGetTextCTM;
|
||||
- (NSPoint) GSGetTextPosition;
|
||||
- (void) GSSetTextCTM: (NSAffineTransform *)ctm;
|
||||
|
@ -81,29 +81,29 @@
|
|||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSinitgraphics;
|
||||
|
||||
- (void) DPScurrentflat: (float*)flatness;
|
||||
- (void) DPScurrentflat: (CGFloat*)flatness;
|
||||
- (void) DPScurrentlinecap: (int*)linecap;
|
||||
- (void) DPScurrentlinejoin: (int*)linejoin;
|
||||
- (void) DPScurrentlinewidth: (float*)width;
|
||||
- (void) DPScurrentmiterlimit: (float*)limit;
|
||||
- (void) DPScurrentpoint: (float*)x : (float*)y;
|
||||
- (void) DPScurrentlinewidth: (CGFloat*)width;
|
||||
- (void) DPScurrentmiterlimit: (CGFloat*)limit;
|
||||
- (void) DPScurrentpoint: (CGFloat*)x : (CGFloat*)y;
|
||||
- (void) DPScurrentstrokeadjust: (int*)b;
|
||||
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offset;
|
||||
- (void) DPSsetflat: (float)flatness;
|
||||
- (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offset;
|
||||
- (void) DPSsetflat: (CGFloat)flatness;
|
||||
- (void) DPSsetlinecap: (int)linecap;
|
||||
- (void) DPSsetlinejoin: (int)linejoin;
|
||||
- (void) DPSsetlinewidth: (float)width;
|
||||
- (void) DPSsetmiterlimit: (float)limit;
|
||||
- (void) DPSsetlinewidth: (CGFloat)width;
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit;
|
||||
- (void) DPSsetstrokeadjust: (int)b;
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* Matrix operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSconcat: (const float*)m;
|
||||
- (void) DPSconcat: (const CGFloat*)m;
|
||||
- (void) DPSinitmatrix;
|
||||
- (void) DPSrotate: (float)angle;
|
||||
- (void) DPSscale: (float)x : (float)y;
|
||||
- (void) DPStranslate: (float)x : (float)y;
|
||||
- (void) DPSrotate: (CGFloat)angle;
|
||||
- (void) DPSscale: (CGFloat)x : (CGFloat)y;
|
||||
- (void) DPStranslate: (CGFloat)x : (CGFloat)y;
|
||||
|
||||
- (NSAffineTransform *) GSCurrentCTM;
|
||||
- (void) GSSetCTM: (NSAffineTransform *)ctm;
|
||||
|
@ -114,32 +114,32 @@
|
|||
/* ----------------------------------------------------------------------- */
|
||||
- (NSPoint) currentPoint;
|
||||
|
||||
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1
|
||||
: (float)angle2;
|
||||
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1
|
||||
: (float)angle2;
|
||||
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r;
|
||||
- (void) DPSarc: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1
|
||||
: (CGFloat)angle2;
|
||||
- (void) DPSarcn: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1
|
||||
: (CGFloat)angle2;
|
||||
- (void) DPSarct: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)r;
|
||||
- (void) DPSclip;
|
||||
- (void) DPSclosepath;
|
||||
- (void) DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3;
|
||||
- (void) DPScurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3;
|
||||
- (void) DPSeoclip;
|
||||
- (void) DPSeofill;
|
||||
- (void) DPSfill;
|
||||
- (void) DPSflattenpath;
|
||||
- (void) DPSinitclip;
|
||||
- (void) DPSlineto: (float)x : (float)y;
|
||||
- (void) DPSmoveto: (float)x : (float)y;
|
||||
- (void) DPSlineto: (CGFloat)x : (CGFloat)y;
|
||||
- (void) DPSmoveto: (CGFloat)x : (CGFloat)y;
|
||||
- (void) DPSnewpath;
|
||||
- (void) DPSpathbbox: (float*)llx : (float*)lly : (float*)urx : (float*)ury;
|
||||
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3;
|
||||
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h;
|
||||
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h;
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h;
|
||||
- (void) DPSpathbbox: (CGFloat*)llx : (CGFloat*)lly : (CGFloat*)urx : (CGFloat*)ury;
|
||||
- (void) DPSrcurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3;
|
||||
- (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h;
|
||||
- (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h;
|
||||
- (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h;
|
||||
- (void) DPSreversepath;
|
||||
- (void) DPSrlineto: (float)x : (float)y;
|
||||
- (void) DPSrmoveto: (float)x : (float)y;
|
||||
- (void) DPSrlineto: (CGFloat)x : (CGFloat)y;
|
||||
- (void) DPSrmoveto: (CGFloat)x : (CGFloat)y;
|
||||
- (void) DPSstroke;
|
||||
|
||||
- (void) GSSendBezierPath: (NSBezierPath *)path;
|
||||
|
@ -149,9 +149,9 @@
|
|||
- (NSDictionary *) GSReadRect: (NSRect)rect;
|
||||
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix
|
||||
: (int) pixelsWide : (int) pixelsHigh
|
||||
: (int) bitsPerSample : (int) samplesPerPixel
|
||||
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
|
||||
: (NSInteger) pixelsWide : (NSInteger) pixelsHigh
|
||||
: (NSInteger) bitsPerSample : (NSInteger) samplesPerPixel
|
||||
: (NSInteger) bitsPerPixel : (NSInteger) bytesPerRow : (BOOL) isPlanar
|
||||
: (BOOL) hasAlpha : (NSString *) colorSpaceName
|
||||
: (const unsigned char *const [5]) data;
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
{
|
||||
@public
|
||||
int clinecap, clinejoin;
|
||||
float clinewidth, cmiterlimit;
|
||||
float cstrokeadjust;
|
||||
CGFloat clinewidth, cmiterlimit;
|
||||
CGFloat cstrokeadjust;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -95,7 +95,7 @@ draw_info_t ART_DI;
|
|||
}
|
||||
|
||||
/* specially optimized versions (since these are common and simple) */
|
||||
-(void) DPSsetgray: (float)gray
|
||||
-(void) DPSsetgray: (CGFloat)gray
|
||||
{
|
||||
if (gray < 0.0) gray = 0.0;
|
||||
if (gray > 1.0) gray = 1.0;
|
||||
|
@ -108,7 +108,7 @@ draw_info_t ART_DI;
|
|||
fill_color[0] = fill_color[1] = fill_color[2] = gray * 255;
|
||||
}
|
||||
|
||||
-(void) DPSsetalpha: (float)a
|
||||
-(void) DPSsetalpha: (CGFloat)a
|
||||
{
|
||||
if (a < 0.0) a = 0.0;
|
||||
if (a > 1.0) a = 1.0;
|
||||
|
@ -116,7 +116,7 @@ draw_info_t ART_DI;
|
|||
stroke_color[3] = fill_color[3] = a * 255;
|
||||
}
|
||||
|
||||
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b
|
||||
- (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b
|
||||
{
|
||||
if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0;
|
||||
if (g < 0.0) g = 0.0; if (g > 1.0) g = 1.0;
|
||||
|
@ -137,11 +137,11 @@ draw_info_t ART_DI;
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Text operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSashow: (float)ax : (float)ay : (const char*)s
|
||||
- (void) DPSashow: (CGFloat)ax : (CGFloat)ay : (const char*)s
|
||||
{ /* adds (ax,ay) in user space to each glyph's x/y advancement */
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
float numarray[2];
|
||||
CGFloat numarray[2];
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
|
@ -168,13 +168,13 @@ draw_info_t ART_DI;
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay
|
||||
- (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (CGFloat)ax : (CGFloat)ay
|
||||
: (const char*)s
|
||||
{ /* adds (ax,ay) in user space to every glyph's advancement and (cx,cy)
|
||||
to character c's x/y advancement */
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
float numarray[4];
|
||||
CGFloat numarray[4];
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
|
@ -244,11 +244,11 @@ draw_info_t ART_DI;
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSwidthshow: (float)cx : (float)cy : (int)c : (const char*)s
|
||||
- (void) DPSwidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (const char*)s
|
||||
{ /* adds (x,y) in user space to character c's x/y advancement */
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
float numarray[2];
|
||||
CGFloat numarray[2];
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
|
@ -274,7 +274,7 @@ draw_info_t ART_DI;
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
@ -301,7 +301,7 @@ draw_info_t ART_DI;
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
@ -328,7 +328,7 @@ draw_info_t ART_DI;
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
@ -453,19 +453,19 @@ draw_info_t ART_DI;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPScurrentlinewidth: (float*)width
|
||||
- (void) DPScurrentlinewidth: (CGFloat*)width
|
||||
{
|
||||
*width = line_width;
|
||||
}
|
||||
|
||||
- (void) DPScurrentmiterlimit: (float*)limit
|
||||
- (void) DPScurrentmiterlimit: (CGFloat*)limit
|
||||
{
|
||||
*limit = miter_limit;
|
||||
}
|
||||
|
||||
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offs
|
||||
- (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offs
|
||||
{
|
||||
int i;
|
||||
NSInteger i;
|
||||
|
||||
if (dash.n_dash)
|
||||
{
|
||||
|
@ -530,14 +530,14 @@ draw_info_t ART_DI;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPSsetlinewidth: (float)width
|
||||
- (void) DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
line_width = width;
|
||||
/* TODO? handle line_width=0 properly */
|
||||
if (line_width <= 0) line_width = 1;
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
miter_limit=limit;
|
||||
}
|
||||
|
|
|
@ -834,7 +834,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
- (void) dissolveGState: (GSGState *)source
|
||||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
delta: (float)fraction
|
||||
delta: (CGFloat)fraction
|
||||
{
|
||||
/* much setup code shared with compositeGState:... */
|
||||
ARTGState *ags = (ARTGState *)source;
|
||||
|
@ -1209,7 +1209,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
if (op == NSCompositeSourceOver)
|
||||
{
|
||||
|
|
|
@ -363,7 +363,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
|
|||
: (unsigned char *)abuf : (int)abpl
|
||||
color:(unsigned char)r : (unsigned char)g : (unsigned char)b : (unsigned char)alpha
|
||||
transform: (NSAffineTransform *)transform
|
||||
deltas: (const float *)delta_data : (int)delta_size : (int)delta_flags
|
||||
deltas: (const CGFloat *)delta_data : (int)delta_size : (int)delta_flags
|
||||
widthChar: (int) wch
|
||||
drawinfo: (draw_info_t *)di
|
||||
{
|
||||
|
@ -2129,7 +2129,7 @@ delta:0,
|
|||
/* TODO: sometimes gets 'glyph transformation failed', probably need to
|
||||
add code to avoid loading bitmaps for glyphs */
|
||||
-(void) outlineString: (const char *)s
|
||||
at: (float)x : (float)y
|
||||
at: (CGFloat)x : (CGFloat)y
|
||||
gstate: (void *)func_param
|
||||
{
|
||||
unichar *c;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
color: (unsigned char)r : (unsigned char)g : (unsigned char)b
|
||||
: (unsigned char)alpha
|
||||
transform: (NSAffineTransform *)transform
|
||||
deltas: (const float *)delta_data : (int)delta_size : (int)delta_flags
|
||||
deltas: (const CGFloat *)delta_data : (int)delta_size : (int)delta_flags
|
||||
widthChar: (int) wch
|
||||
drawinfo: (struct draw_info_s *)di;
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
drawinfo: (struct draw_info_s *)di;
|
||||
|
||||
-(void) outlineString: (const char *)s
|
||||
at: (float)x : (float)y
|
||||
at: (CGFloat)x : (CGFloat)y
|
||||
gstate: (void *)func_param;
|
||||
|
||||
+(void) initializeBackend;
|
||||
|
|
|
@ -449,7 +449,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib,
|
|||
: (unsigned char)b
|
||||
: (unsigned char)alpha
|
||||
transform: (NSAffineTransform *)transform
|
||||
deltas: (const float *)delta_data : (int)delta_size : (int)delta_flags
|
||||
deltas: (const CGFloat *)delta_data : (int)delta_size : (int)delta_flags
|
||||
widthChar: (int) wch
|
||||
drawinfo: (draw_info_t *)di
|
||||
{
|
||||
|
@ -2032,7 +2032,7 @@ static FT_Outline_Funcs bezierpath_funcs = {
|
|||
/* TODO: sometimes gets 'glyph transformation failed', probably need to
|
||||
add code to avoid loading bitmaps for glyphs */
|
||||
- (void) outlineString: (const char *)s
|
||||
at: (float)x : (float)y
|
||||
at: (CGFloat)x : (CGFloat)y
|
||||
gstate: (void *)func_param
|
||||
{
|
||||
#if 0
|
||||
|
|
|
@ -398,7 +398,7 @@ static void artcontext_render_svp(const ArtSVP *svp, int x0, int y0, int x1, int
|
|||
also fills in the axis coordinates (x0/y0 is min) and returns 1. Otherwise
|
||||
returns 0. (Actually, if pixel is NO, it's enough that the edges remain
|
||||
within one pixel.) */
|
||||
- (int) _axis_rectangle: (float)x : (float)y : (float)w : (float)h
|
||||
- (int) _axis_rectangle: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
vpath: (ArtVpath *)vp
|
||||
axis: (int *)px0 : (int *)py0 : (int *)px1 : (int *)py1
|
||||
pixel: (BOOL)pixel
|
||||
|
@ -834,7 +834,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
[self _clip: ART_WIND_RULE_ODDEVEN];
|
||||
}
|
||||
|
||||
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
ArtVpath vp[6];
|
||||
ArtSVP *svp;
|
||||
|
@ -972,7 +972,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
[self _fill: ART_WIND_RULE_NONZERO];
|
||||
}
|
||||
|
||||
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
ArtVpath vp[6];
|
||||
ArtSVP *svp;
|
||||
|
@ -1303,7 +1303,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
ArtVpath *vp, *vp2;
|
||||
double matrix[6];
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
NSZoneFree(NSDefaultMallocZone(), _base); \
|
||||
}
|
||||
|
||||
static inline double doubleFromUserSpace(NSAffineTransform *ctm, double d)
|
||||
static inline double doubleFromUserSpace(NSAffineTransform *ctm, CGFloat d)
|
||||
{
|
||||
if (ctm)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ static inline double doubleFromUserSpace(NSAffineTransform *ctm, double d)
|
|||
return d;
|
||||
}
|
||||
|
||||
static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
||||
static inline CGFloat floatToUserSpace(NSAffineTransform *ctm, double d)
|
||||
{
|
||||
if (ctm)
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
d = doubleFromUserSpace(ictm, d);
|
||||
RELEASE(ictm);
|
||||
}
|
||||
return (float)d;
|
||||
return (CGFloat)d;
|
||||
}
|
||||
|
||||
|
||||
|
@ -416,7 +416,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) GSSetFontSize: (float)size
|
||||
- (void) GSSetFontSize: (CGFloat)size
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -529,11 +529,11 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
cairo_new_path(_ct);
|
||||
}
|
||||
|
||||
- (void) DPScurrentflat: (float *)flatness
|
||||
- (void) DPScurrentflat: (CGFloat *)flatness
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
*flatness = (float)cairo_get_tolerance(_ct) * 2;
|
||||
*flatness = (CGFloat)cairo_get_tolerance(_ct) * 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -593,7 +593,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
*/
|
||||
}
|
||||
|
||||
- (void) DPScurrentlinewidth: (float *)width
|
||||
- (void) DPScurrentlinewidth: (CGFloat *)width
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -601,7 +601,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPScurrentmiterlimit: (float *)limit
|
||||
- (void) DPScurrentmiterlimit: (CGFloat *)limit
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -613,7 +613,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
{
|
||||
}
|
||||
|
||||
- (void) DPSsetdash: (const float *)pat : (int)size : (float)foffset
|
||||
- (void) DPSsetdash: (const CGFloat *)pat : (NSInteger)size : (CGFloat)foffset
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -633,7 +633,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPSsetflat: (float)flatness
|
||||
- (void) DPSsetflat: (CGFloat)flatness
|
||||
{
|
||||
[super DPSsetflat: flatness];
|
||||
if (_ct)
|
||||
|
@ -660,7 +660,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPSsetlinewidth: (float)width
|
||||
- (void) DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -668,7 +668,7 @@ static inline float floatToUserSpace(NSAffineTransform *ctm, double d)
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
if (_ct)
|
||||
{
|
||||
|
@ -1003,10 +1003,10 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
|||
cairo_fill(_ct);
|
||||
}
|
||||
|
||||
- (void) DPSimage: (NSAffineTransform *)matrix : (int)pixelsWide
|
||||
: (int)pixelsHigh : (int)bitsPerSample
|
||||
: (int)samplesPerPixel : (int)bitsPerPixel
|
||||
: (int)bytesPerRow : (BOOL)isPlanar
|
||||
- (void) DPSimage: (NSAffineTransform *)matrix : (NSInteger)pixelsWide
|
||||
: (NSInteger)pixelsHigh : (NSInteger)bitsPerSample
|
||||
: (NSInteger)samplesPerPixel : (NSInteger)bitsPerPixel
|
||||
: (NSInteger)bytesPerRow : (BOOL)isPlanar
|
||||
: (BOOL)hasAlpha : (NSString *)colorSpaceName
|
||||
: (const unsigned char *const[5])data
|
||||
{
|
||||
|
@ -1233,7 +1233,7 @@ _set_op(cairo_t *ct, NSCompositingOperation op)
|
|||
fromRect: (NSRect)srcRect
|
||||
toPoint: (NSPoint)destPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
cairo_surface_t *src;
|
||||
NSSize ssize = NSZeroSize;
|
||||
|
@ -1375,7 +1375,7 @@ doesn't support to use the receiver cairo target as the source. */
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
NSAffineTransformStruct tstruct = [ctm transformStruct];
|
||||
cairo_surface_t *src;
|
||||
|
|
|
@ -106,8 +106,8 @@ static NSMapTable *gtable;
|
|||
|
||||
@interface GSContext (PrivateOps)
|
||||
- (void)DPSdefineuserobject;
|
||||
- (void)DPSexecuserobject: (int)index;
|
||||
- (void)DPSundefineuserobject: (int)index;
|
||||
- (void)DPSexecuserobject: (NSInteger)index;
|
||||
- (void)DPSundefineuserobject: (NSInteger)index;
|
||||
- (void)DPSclear;
|
||||
- (void)DPScopy: (int)n;
|
||||
- (void)DPScount: (int *)n;
|
||||
|
@ -261,23 +261,23 @@ static NSMapTable *gtable;
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Color operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPScurrentalpha: (float *)a
|
||||
- (void) DPScurrentalpha: (CGFloat *)a
|
||||
{
|
||||
[gstate DPScurrentalpha: a];
|
||||
}
|
||||
|
||||
- (void) DPScurrentcmykcolor: (float*)c : (float*)m : (float*)y : (float*)k
|
||||
- (void) DPScurrentcmykcolor: (CGFloat*)c : (CGFloat*)m : (CGFloat*)y : (CGFloat*)k
|
||||
{
|
||||
[gstate DPScurrentcmykcolor:c :m :y :k];
|
||||
}
|
||||
|
||||
- (void) DPScurrentgray: (float*)gray
|
||||
- (void) DPScurrentgray: (CGFloat*)gray
|
||||
{
|
||||
CHECK_NULL_OUTPUT(gray);
|
||||
[gstate DPScurrentgray: gray];
|
||||
}
|
||||
|
||||
- (void) DPScurrenthsbcolor: (float*)h : (float*)s : (float*)b
|
||||
- (void) DPScurrenthsbcolor: (CGFloat*)h : (CGFloat*)s : (CGFloat*)b
|
||||
{
|
||||
CHECK_NULL_OUTPUT(h);
|
||||
CHECK_NULL_OUTPUT(s);
|
||||
|
@ -285,7 +285,7 @@ static NSMapTable *gtable;
|
|||
[gstate DPScurrenthsbcolor:h :s :b];
|
||||
}
|
||||
|
||||
- (void) DPScurrentrgbcolor: (float*)r : (float*)g : (float*)b
|
||||
- (void) DPScurrentrgbcolor: (CGFloat*)r : (CGFloat*)g : (CGFloat*)b
|
||||
{
|
||||
CHECK_NULL_OUTPUT(r);
|
||||
CHECK_NULL_OUTPUT(g);
|
||||
|
@ -293,27 +293,27 @@ static NSMapTable *gtable;
|
|||
[gstate DPScurrentrgbcolor:r :g :b];
|
||||
}
|
||||
|
||||
- (void) DPSsetalpha: (float)a
|
||||
- (void) DPSsetalpha: (CGFloat)a
|
||||
{
|
||||
[gstate DPSsetalpha: a];
|
||||
}
|
||||
|
||||
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k
|
||||
- (void) DPSsetcmykcolor: (CGFloat)c : (CGFloat)m : (CGFloat)y : (CGFloat)k
|
||||
{
|
||||
[gstate DPSsetcmykcolor:c :m :y :k];
|
||||
}
|
||||
|
||||
- (void) DPSsetgray: (float)gray
|
||||
- (void) DPSsetgray: (CGFloat)gray
|
||||
{
|
||||
[gstate DPSsetgray: gray];
|
||||
}
|
||||
|
||||
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b
|
||||
- (void) DPSsethsbcolor: (CGFloat)h : (CGFloat)s : (CGFloat)b
|
||||
{
|
||||
[gstate DPSsethsbcolor:h :s :b];
|
||||
}
|
||||
|
||||
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b
|
||||
- (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b
|
||||
{
|
||||
[gstate DPSsetrgbcolor:r :g :b];
|
||||
}
|
||||
|
@ -346,12 +346,12 @@ static NSMapTable *gtable;
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Text operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSashow: (float)x : (float)y : (const char *)s
|
||||
- (void) DPSashow: (CGFloat)x : (CGFloat)y : (const char *)s
|
||||
{
|
||||
[gstate DPSashow: x : y : s];
|
||||
}
|
||||
|
||||
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay : (const char *)s
|
||||
- (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (CGFloat)ax : (CGFloat)ay : (const char *)s
|
||||
{
|
||||
[gstate DPSawidthshow: cx : cy : c : ax : ay : s];
|
||||
}
|
||||
|
@ -372,27 +372,27 @@ static NSMapTable *gtable;
|
|||
[gstate DPSshow: s];
|
||||
}
|
||||
|
||||
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char *)s
|
||||
- (void) DPSwidthshow: (CGFloat)x : (CGFloat)y : (int)c : (const char *)s
|
||||
{
|
||||
[gstate DPSwidthshow: x : y : c : s];
|
||||
}
|
||||
|
||||
- (void) DPSxshow: (const char *)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxshow: (const char *)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[gstate DPSxshow: s : numarray : size];
|
||||
}
|
||||
|
||||
- (void) DPSxyshow: (const char *)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxyshow: (const char *)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[gstate DPSxyshow: s : numarray : size];
|
||||
}
|
||||
|
||||
- (void) DPSyshow: (const char *)s : (const float*)numarray : (int)size
|
||||
- (void) DPSyshow: (const char *)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[gstate DPSyshow: s : numarray : size];
|
||||
}
|
||||
|
||||
- (void) GSSetCharacterSpacing: (float)extra
|
||||
- (void) GSSetCharacterSpacing: (CGFloat)extra
|
||||
{
|
||||
[gstate GSSetCharacterSpacing: extra];
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ static NSMapTable *gtable;
|
|||
[gstate GSSetFont: fontref];
|
||||
}
|
||||
|
||||
- (void) GSSetFontSize: (float)size
|
||||
- (void) GSSetFontSize: (CGFloat)size
|
||||
{
|
||||
[gstate GSSetFontSize: size];
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ static NSMapTable *gtable;
|
|||
[gstate DPSinitgraphics];
|
||||
}
|
||||
|
||||
- (void) DPSsetgstate: (int)gst
|
||||
- (void) DPSsetgstate: (NSInteger)gst
|
||||
{
|
||||
if (gst)
|
||||
{
|
||||
|
@ -486,35 +486,35 @@ static NSMapTable *gtable;
|
|||
DESTROY(gstate);
|
||||
}
|
||||
|
||||
- (int) GSDefineGState
|
||||
- (NSInteger) GSDefineGState
|
||||
{
|
||||
if (gstate == nil)
|
||||
{
|
||||
DPS_ERROR(DPSundefined, @"No gstate");
|
||||
return 0;
|
||||
}
|
||||
[isa insertObject: AUTORELEASE([gstate copy]) forKey: ++unique_index];
|
||||
[isa insertObject: AUTORELEASE([gstate copy]) forKey: ++unique_index];
|
||||
|
||||
return unique_index;
|
||||
}
|
||||
|
||||
- (void) GSUndefineGState: (int)gst
|
||||
- (void) GSUndefineGState: (NSInteger)gst
|
||||
{
|
||||
[self DPSundefineuserobject: gst];
|
||||
}
|
||||
|
||||
- (void) GSReplaceGState: (int)gst
|
||||
- (void) GSReplaceGState: (NSInteger)gst
|
||||
{
|
||||
if (gst <= 0)
|
||||
return;
|
||||
|
||||
[isa insertObject: AUTORELEASE([gstate copy]) forKey: gst];
|
||||
[isa insertObject: AUTORELEASE([gstate copy]) forKey: gst];
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPScurrentflat: (float*)flatness
|
||||
- (void) DPScurrentflat: (CGFloat*)flatness
|
||||
{
|
||||
CHECK_NULL_OUTPUT(flatness);
|
||||
[gstate DPScurrentflat: flatness];
|
||||
|
@ -530,18 +530,18 @@ static NSMapTable *gtable;
|
|||
[gstate DPScurrentlinejoin: linejoin];
|
||||
}
|
||||
|
||||
- (void) DPScurrentlinewidth: (float*)width
|
||||
- (void) DPScurrentlinewidth: (CGFloat*)width
|
||||
{
|
||||
[gstate DPScurrentlinewidth: width];
|
||||
}
|
||||
|
||||
- (void) DPScurrentmiterlimit: (float*)limit
|
||||
- (void) DPScurrentmiterlimit: (CGFloat*)limit
|
||||
{
|
||||
CHECK_NULL_OUTPUT(limit);
|
||||
[gstate DPScurrentmiterlimit: limit];
|
||||
}
|
||||
|
||||
- (void) DPScurrentpoint: (float*)x : (float*)y
|
||||
- (void) DPScurrentpoint: (CGFloat*)x : (CGFloat*)y
|
||||
{
|
||||
CHECK_NULL_OUTPUT(x);
|
||||
CHECK_NULL_OUTPUT(y);
|
||||
|
@ -554,17 +554,17 @@ static NSMapTable *gtable;
|
|||
[gstate DPScurrentstrokeadjust: b];
|
||||
}
|
||||
|
||||
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offset
|
||||
- (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offset
|
||||
{
|
||||
[gstate DPSsetdash: pat : size : offset];
|
||||
}
|
||||
|
||||
- (void) DPSsetflat: (float)flatness
|
||||
- (void) DPSsetflat: (CGFloat)flatness
|
||||
{
|
||||
[gstate DPSsetflat: flatness];
|
||||
}
|
||||
|
||||
- (void) DPSsethalftonephase: (float)x : (float)y
|
||||
- (void) DPSsethalftonephase: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
@ -579,12 +579,12 @@ static NSMapTable *gtable;
|
|||
[gstate DPSsetlinejoin: linejoin];
|
||||
}
|
||||
|
||||
- (void) DPSsetlinewidth: (float)width
|
||||
- (void) DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
[gstate DPSsetlinewidth: width];
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
[gstate DPSsetmiterlimit: limit];
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ static NSMapTable *gtable;
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Matrix operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSconcat: (const float*)m
|
||||
- (void) DPSconcat: (const CGFloat*)m
|
||||
{
|
||||
[gstate DPSconcat: m];
|
||||
}
|
||||
|
@ -607,17 +607,17 @@ static NSMapTable *gtable;
|
|||
[gstate DPSinitmatrix];
|
||||
}
|
||||
|
||||
- (void) DPSrotate: (float)angle
|
||||
- (void) DPSrotate: (CGFloat)angle
|
||||
{
|
||||
[gstate DPSrotate: angle];
|
||||
}
|
||||
|
||||
- (void) DPSscale: (float)x : (float)y
|
||||
- (void) DPSscale: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPSscale:x :y];
|
||||
}
|
||||
|
||||
- (void) DPStranslate: (float)x : (float)y
|
||||
- (void) DPStranslate: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPStranslate:x :y];
|
||||
}
|
||||
|
@ -640,19 +640,19 @@ static NSMapTable *gtable;
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Paint operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1
|
||||
: (float)angle2
|
||||
- (void) DPSarc: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1
|
||||
: (CGFloat)angle2
|
||||
{
|
||||
[gstate DPSarc: x : y : r : angle1 : angle2];
|
||||
}
|
||||
|
||||
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1
|
||||
: (float)angle2
|
||||
- (void) DPSarcn: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1
|
||||
: (CGFloat)angle2
|
||||
{
|
||||
[gstate DPSarcn: x : y : r : angle1 : angle2];
|
||||
}
|
||||
|
||||
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r;
|
||||
- (void) DPSarct: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)r;
|
||||
{
|
||||
[gstate DPSarct: x1 : y1 : x2 : y2 : r];
|
||||
}
|
||||
|
@ -667,8 +667,8 @@ static NSMapTable *gtable;
|
|||
[gstate DPSclosepath];
|
||||
}
|
||||
|
||||
- (void) DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3
|
||||
- (void) DPScurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3
|
||||
{
|
||||
[gstate DPScurveto: x1 : y1 : x2 : y2 : x3 : y3];
|
||||
}
|
||||
|
@ -698,12 +698,12 @@ static NSMapTable *gtable;
|
|||
[gstate DPSinitclip];
|
||||
}
|
||||
|
||||
- (void) DPSlineto: (float)x : (float)y
|
||||
- (void) DPSlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPSlineto: x : y];
|
||||
}
|
||||
|
||||
- (void) DPSmoveto: (float)x : (float)y
|
||||
- (void) DPSmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPSmoveto: x : y];
|
||||
}
|
||||
|
@ -713,28 +713,28 @@ static NSMapTable *gtable;
|
|||
[gstate DPSnewpath];
|
||||
}
|
||||
|
||||
- (void) DPSpathbbox: (float*)llx : (float*)lly : (float*)urx : (float*)ury
|
||||
- (void) DPSpathbbox: (CGFloat*)llx : (CGFloat*)lly : (CGFloat*)urx : (CGFloat*)ury
|
||||
{
|
||||
[gstate DPSpathbbox: llx : lly : urx : ury];
|
||||
}
|
||||
|
||||
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3
|
||||
- (void) DPSrcurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3
|
||||
{
|
||||
[gstate DPSrcurveto: x1 : y1 : x2 : y2 : x3 : y3];
|
||||
}
|
||||
|
||||
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
[gstate DPSrectclip: x : y : w : h];
|
||||
}
|
||||
|
||||
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
[gstate DPSrectfill:x :y :w :h];
|
||||
}
|
||||
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
[gstate DPSrectstroke:x :y :w :h];
|
||||
}
|
||||
|
@ -744,12 +744,12 @@ static NSMapTable *gtable;
|
|||
[gstate DPSreversepath];
|
||||
}
|
||||
|
||||
- (void) DPSrlineto: (float)x : (float)y
|
||||
- (void) DPSrlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPSrlineto: x : y];
|
||||
}
|
||||
|
||||
- (void) DPSrmoveto: (float)x : (float)y
|
||||
- (void) DPSrmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[gstate DPSrmoveto: x : y];
|
||||
}
|
||||
|
@ -795,8 +795,8 @@ static NSMapTable *gtable;
|
|||
/*-------------------------------------------------------------------------*/
|
||||
/* Graphics Extension Ops */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
- (void) DPScomposite: (float)x : (float)y : (float)w : (float)h
|
||||
: (int)gstateNum : (float)dx : (float)dy : (int)op
|
||||
- (void) DPScomposite: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
: (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (NSCompositingOperation)op
|
||||
{
|
||||
[self GScomposite: gstateNum
|
||||
toPoint: NSMakePoint(dx, dy)
|
||||
|
@ -805,13 +805,13 @@ static NSMapTable *gtable;
|
|||
fraction: 1.0];
|
||||
}
|
||||
|
||||
- (void) DPScompositerect: (float)x : (float)y : (float)w : (float)h : (int)op
|
||||
- (void) DPScompositerect: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h : (NSCompositingOperation)op
|
||||
{
|
||||
[gstate compositerect: NSMakeRect(x, y, w, h) op: op];
|
||||
[gstate compositerect: NSMakeRect(x, y, w, h) op: op];
|
||||
}
|
||||
|
||||
- (void) DPSdissolve: (float)x : (float)y : (float)w : (float)h
|
||||
: (int)gstateNum : (float)dx : (float)dy : (float)delta
|
||||
- (void) DPSdissolve: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
: (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (CGFloat)delta
|
||||
{
|
||||
[self GScomposite: gstateNum
|
||||
toPoint: NSMakePoint(dx, dy)
|
||||
|
@ -820,11 +820,11 @@ static NSMapTable *gtable;
|
|||
fraction: delta];
|
||||
}
|
||||
|
||||
- (void) GScomposite: (int)gstateNum
|
||||
- (void) GScomposite: (NSInteger)gstateNum
|
||||
toPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
GSGState *g = gstate;
|
||||
|
||||
|
@ -841,11 +841,11 @@ static NSMapTable *gtable;
|
|||
fraction: delta];
|
||||
}
|
||||
|
||||
- (void) GSdraw: (int)gstateNum
|
||||
- (void) GSdraw: (NSInteger)gstateNum
|
||||
toPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
GSGState *g = gstate;
|
||||
|
||||
|
@ -934,9 +934,9 @@ static NSMapTable *gtable;
|
|||
/*
|
||||
* Render Bitmap Images
|
||||
*/
|
||||
- (void) NSDrawBitmap: (NSRect) rect : (int) pixelsWide : (int) pixelsHigh
|
||||
: (int) bitsPerSample : (int) samplesPerPixel
|
||||
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
|
||||
- (void) NSDrawBitmap: (NSRect) rect : (NSInteger) pixelsWide : (NSInteger) pixelsHigh
|
||||
: (NSInteger) bitsPerSample : (NSInteger) samplesPerPixel
|
||||
: (NSInteger) bitsPerPixel : (NSInteger) bytesPerRow : (BOOL) isPlanar
|
||||
: (BOOL) hasAlpha : (NSString *) colorSpaceName
|
||||
: (const unsigned char *const [5]) data
|
||||
{
|
||||
|
@ -981,16 +981,17 @@ static NSMapTable *gtable;
|
|||
int n;
|
||||
id obj;
|
||||
NSNumber *number;
|
||||
|
||||
ctxt_pop(obj, opstack, NSObject);
|
||||
ctxt_pop(number, opstack, NSNumber);
|
||||
n = [number intValue];
|
||||
if (n < 0)
|
||||
DPS_ERROR(DPSinvalidparam, @"Invalid userobject index");
|
||||
else
|
||||
[isa insertObject: obj forKey: n];
|
||||
[isa insertObject: obj forKey: n];
|
||||
}
|
||||
|
||||
- (void)DPSexecuserobject: (int)index
|
||||
- (void)DPSexecuserobject: (NSInteger)index
|
||||
{
|
||||
id obj;
|
||||
|
||||
|
@ -1002,7 +1003,7 @@ static NSMapTable *gtable;
|
|||
ctxt_push(obj, opstack);
|
||||
}
|
||||
|
||||
- (void)DPSundefineuserobject: (int)index
|
||||
- (void)DPSundefineuserobject: (NSInteger)index
|
||||
{
|
||||
if (index < 0 || [isa getObjectForKey: index] == nil)
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
- (void) dissolveGState: (GSGState *)source
|
||||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
delta: (float)delta
|
||||
delta: (CGFloat)delta
|
||||
{
|
||||
[self compositeGState: source
|
||||
fromRect: aRect
|
||||
|
@ -174,7 +174,7 @@
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -207,12 +207,12 @@
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Color operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPScurrentalpha: (float*)a
|
||||
- (void) DPScurrentalpha: (CGFloat*)a
|
||||
{
|
||||
*a = fillColor.field[AINDEX];
|
||||
}
|
||||
|
||||
- (void) DPScurrentcmykcolor: (float*)c : (float*)m : (float*)y : (float*)k
|
||||
- (void) DPScurrentcmykcolor: (CGFloat*)c : (CGFloat*)m : (CGFloat*)y : (CGFloat*)k
|
||||
{
|
||||
device_color_t new = fillColor;
|
||||
gsColorToCMYK(&new);
|
||||
|
@ -222,21 +222,21 @@
|
|||
*k = new.field[3];
|
||||
}
|
||||
|
||||
- (void) DPScurrentgray: (float*)gray
|
||||
- (void) DPScurrentgray: (CGFloat*)gray
|
||||
{
|
||||
device_color_t gcolor = fillColor;
|
||||
gsColorToGray(&gcolor);
|
||||
*gray = gcolor.field[0];
|
||||
}
|
||||
|
||||
- (void) DPScurrenthsbcolor: (float*)h : (float*)s : (float*)b
|
||||
- (void) DPScurrenthsbcolor: (CGFloat*)h : (CGFloat*)s : (CGFloat*)b
|
||||
{
|
||||
device_color_t gcolor = fillColor;
|
||||
gsColorToHSB(&gcolor);
|
||||
*h = gcolor.field[0]; *s = gcolor.field[1]; *b = gcolor.field[2];
|
||||
}
|
||||
|
||||
- (void) DPScurrentrgbcolor: (float*)r : (float*)g : (float*)b
|
||||
- (void) DPScurrentrgbcolor: (CGFloat*)r : (CGFloat*)g : (CGFloat*)b
|
||||
{
|
||||
device_color_t gcolor = fillColor;
|
||||
gsColorToRGB(&gcolor);
|
||||
|
@ -247,7 +247,7 @@
|
|||
if (x < 0.0) x = 0.0; \
|
||||
if (x > 1.0) x = 1.0;
|
||||
|
||||
- (void) DPSsetalpha: (float)a
|
||||
- (void) DPSsetalpha: (CGFloat)a
|
||||
{
|
||||
CLAMP(a)
|
||||
fillColor.field[AINDEX] = strokeColor.field[AINDEX] = a;
|
||||
|
@ -255,7 +255,7 @@
|
|||
[self setColor: &strokeColor state: COLOR_STROKE];
|
||||
}
|
||||
|
||||
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k
|
||||
- (void) DPSsetcmykcolor: (CGFloat)c : (CGFloat)m : (CGFloat)y : (CGFloat)k
|
||||
{
|
||||
device_color_t col;
|
||||
CLAMP(c)
|
||||
|
@ -268,7 +268,7 @@
|
|||
[self setColor: &col state: COLOR_BOTH];
|
||||
}
|
||||
|
||||
- (void) DPSsetgray: (float)gray
|
||||
- (void) DPSsetgray: (CGFloat)gray
|
||||
{
|
||||
device_color_t col;
|
||||
CLAMP(gray)
|
||||
|
@ -278,7 +278,7 @@
|
|||
[self setColor: &col state: COLOR_BOTH];
|
||||
}
|
||||
|
||||
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b
|
||||
- (void) DPSsethsbcolor: (CGFloat)h : (CGFloat)s : (CGFloat)b
|
||||
{
|
||||
device_color_t col;
|
||||
CLAMP(h)
|
||||
|
@ -290,7 +290,7 @@
|
|||
[self setColor: &col state: COLOR_BOTH];
|
||||
}
|
||||
|
||||
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b
|
||||
- (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b
|
||||
{
|
||||
device_color_t col;
|
||||
CLAMP(r)
|
||||
|
@ -402,10 +402,10 @@ typedef enum {
|
|||
/* Omnibus show string routine that combines that characteristics of
|
||||
ashow, awidthshow, widthshow, xshow, xyshow, and yshow */
|
||||
- (void) _showString: (const char *)s
|
||||
xCharAdj: (float)cx
|
||||
yCharAdj: (float)cy
|
||||
xCharAdj: (CGFloat)cx
|
||||
yCharAdj: (CGFloat)cy
|
||||
char: (char)c
|
||||
adjArray: (const float *)arr
|
||||
adjArray: (const CGFloat *)arr
|
||||
arrType: (show_array_t)type
|
||||
isRelative: (BOOL)relative;
|
||||
{
|
||||
|
@ -478,9 +478,9 @@ typedef enum {
|
|||
free(uch);
|
||||
}
|
||||
|
||||
- (void) DPSashow: (float)x : (float)y : (const char*)s
|
||||
- (void) DPSashow: (CGFloat)x : (CGFloat)y : (const char*)s
|
||||
{
|
||||
float arr[2];
|
||||
CGFloat arr[2];
|
||||
|
||||
arr[0] = x; arr[1] = y;
|
||||
[self _showString: s
|
||||
|
@ -488,10 +488,10 @@ typedef enum {
|
|||
isRelative: YES];
|
||||
}
|
||||
|
||||
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay
|
||||
- (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (CGFloat)ax : (CGFloat)ay
|
||||
: (const char*)s
|
||||
{
|
||||
float arr[2];
|
||||
CGFloat arr[2];
|
||||
|
||||
arr[0] = ax; arr[1] = ay;
|
||||
[self _showString: s
|
||||
|
@ -571,9 +571,9 @@ typedef enum {
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char*)s
|
||||
- (void) DPSwidthshow: (CGFloat)x : (CGFloat)y : (int)c : (const char*)s
|
||||
{
|
||||
float arr[2];
|
||||
CGFloat arr[2];
|
||||
|
||||
arr[0] = 0; arr[1] = 0;
|
||||
[self _showString: s
|
||||
|
@ -581,28 +581,28 @@ typedef enum {
|
|||
isRelative: YES];
|
||||
}
|
||||
|
||||
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self _showString: s
|
||||
xCharAdj: 0 yCharAdj: 0 char: 0 adjArray: numarray arrType: show_array_x
|
||||
isRelative: NO];
|
||||
}
|
||||
|
||||
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self _showString: s
|
||||
xCharAdj: 0 yCharAdj: 0 char: 0 adjArray: numarray arrType: show_array_xy
|
||||
isRelative: NO];
|
||||
}
|
||||
|
||||
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self _showString: s
|
||||
xCharAdj: 0 yCharAdj: 0 char: 0 adjArray: numarray arrType: show_array_y
|
||||
isRelative: NO];
|
||||
}
|
||||
|
||||
- (void) GSSetCharacterSpacing: (float)extra
|
||||
- (void) GSSetCharacterSpacing: (CGFloat)extra
|
||||
{
|
||||
charSpacing = extra;
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ typedef enum {
|
|||
ASSIGN(font, fontref);
|
||||
}
|
||||
|
||||
- (void) GSSetFontSize: (float)size
|
||||
- (void) GSSetFontSize: (CGFloat)size
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -694,7 +694,7 @@ typedef enum {
|
|||
textCtm = [[NSAffineTransform allocWithZone: [self zone]] init];
|
||||
}
|
||||
|
||||
- (void)DPScurrentflat: (float *)flatness
|
||||
- (void)DPScurrentflat: (CGFloat *)flatness
|
||||
{
|
||||
if (path)
|
||||
*flatness = [path flatness];
|
||||
|
@ -712,12 +712,12 @@ typedef enum {
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPScurrentlinewidth: (float*)width
|
||||
- (void) DPScurrentlinewidth: (CGFloat*)width
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPScurrentmiterlimit: (float*)limit
|
||||
- (void) DPScurrentmiterlimit: (CGFloat*)limit
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -740,7 +740,7 @@ typedef enum {
|
|||
return user;
|
||||
}
|
||||
|
||||
- (void)DPScurrentpoint: (float *)x : (float *)y
|
||||
- (void)DPScurrentpoint: (CGFloat *)x : (CGFloat *)y
|
||||
{
|
||||
NSPoint user;
|
||||
|
||||
|
@ -754,12 +754,12 @@ typedef enum {
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offset
|
||||
- (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offset
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void)DPSsetflat: (float)flatness
|
||||
- (void)DPSsetflat: (CGFloat)flatness
|
||||
{
|
||||
if (path)
|
||||
[path setFlatness: flatness];
|
||||
|
@ -775,12 +775,12 @@ typedef enum {
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSsetlinewidth: (float)width
|
||||
- (void) DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
@ -793,7 +793,7 @@ typedef enum {
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Matrix operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void)DPSconcat: (const float *)m
|
||||
- (void)DPSconcat: (const CGFloat *)m
|
||||
{
|
||||
NSAffineTransformStruct matrix;
|
||||
NSAffineTransform *new_ctm = [NSAffineTransform new];
|
||||
|
@ -815,17 +815,17 @@ typedef enum {
|
|||
[ctm makeIdentityMatrix];
|
||||
}
|
||||
|
||||
- (void)DPSrotate: (float)angle
|
||||
- (void)DPSrotate: (CGFloat)angle
|
||||
{
|
||||
[ctm rotateByDegrees: angle];
|
||||
}
|
||||
|
||||
- (void)DPSscale: (float)x : (float)y
|
||||
- (void)DPSscale: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[ctm scaleXBy: x yBy: y];
|
||||
}
|
||||
|
||||
- (void)DPStranslate: (float)x : (float)y
|
||||
- (void)DPStranslate: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[ctm translateToPoint: NSMakePoint(x, y)];
|
||||
}
|
||||
|
@ -848,7 +848,7 @@ typedef enum {
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Paint operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
|
||||
- (void) DPSarc: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2
|
||||
{
|
||||
NSBezierPath *newPath;
|
||||
|
||||
|
@ -868,7 +868,7 @@ typedef enum {
|
|||
RELEASE(newPath);
|
||||
}
|
||||
|
||||
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
|
||||
- (void) DPSarcn: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2
|
||||
{
|
||||
NSBezierPath *newPath;
|
||||
|
||||
|
@ -888,7 +888,7 @@ typedef enum {
|
|||
RELEASE(newPath);
|
||||
}
|
||||
|
||||
- (void)DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r
|
||||
- (void)DPSarct: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)r
|
||||
{
|
||||
NSBezierPath *newPath;
|
||||
|
||||
|
@ -917,8 +917,8 @@ typedef enum {
|
|||
[path closePath];
|
||||
}
|
||||
|
||||
- (void)DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3
|
||||
: (float)y3
|
||||
- (void)DPScurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)x3
|
||||
: (CGFloat)y3
|
||||
{
|
||||
NSPoint p1 = [ctm transformPoint: NSMakePoint(x1, y1)];
|
||||
NSPoint p2 = [ctm transformPoint: NSMakePoint(x2, y2)];
|
||||
|
@ -954,7 +954,7 @@ typedef enum {
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
- (void)DPSlineto: (float)x : (float)y
|
||||
- (void)DPSlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
NSPoint p = [ctm transformPoint: NSMakePoint(x, y)];
|
||||
|
||||
|
@ -962,7 +962,7 @@ typedef enum {
|
|||
[path lineToPoint: p];
|
||||
}
|
||||
|
||||
- (void)DPSmoveto: (float)x : (float)y
|
||||
- (void)DPSmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
NSPoint p = [ctm transformPoint: NSMakePoint(x, y)];
|
||||
|
||||
|
@ -988,7 +988,7 @@ typedef enum {
|
|||
return AUTORELEASE(newPath);
|
||||
}
|
||||
|
||||
- (void)DPSpathbbox: (float *)llx : (float *)lly : (float *)urx : (float *)ury
|
||||
- (void)DPSpathbbox: (CGFloat *)llx : (CGFloat *)lly : (CGFloat *)urx : (CGFloat *)ury
|
||||
{
|
||||
NSBezierPath *bpath = [self bezierPath];
|
||||
NSRect rect = [bpath controlPointBounds];
|
||||
|
@ -1003,8 +1003,8 @@ typedef enum {
|
|||
*ury = NSMaxY(rect);
|
||||
}
|
||||
|
||||
- (void)DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)x3
|
||||
: (float)y3
|
||||
- (void)DPSrcurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)x3
|
||||
: (CGFloat)y3
|
||||
{
|
||||
NSPoint p1 = [ctm deltaPointInMatrixSpace: NSMakePoint(x1, y1)];
|
||||
NSPoint p2 = [ctm deltaPointInMatrixSpace: NSMakePoint(x2, y2)];
|
||||
|
@ -1016,7 +1016,7 @@ typedef enum {
|
|||
controlPoint2: p2];
|
||||
}
|
||||
|
||||
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
NSBezierPath *oldPath = path;
|
||||
|
||||
|
@ -1030,7 +1030,7 @@ typedef enum {
|
|||
[path removeAllPoints];
|
||||
}
|
||||
|
||||
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
NSBezierPath *oldPath = path;
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ typedef enum {
|
|||
path = oldPath;
|
||||
}
|
||||
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
NSBezierPath *oldPath = path;
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ typedef enum {
|
|||
ASSIGN(path, [path bezierPathByReversingPath]);
|
||||
}
|
||||
|
||||
- (void)DPSrlineto: (float)x : (float)y
|
||||
- (void)DPSrlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
NSPoint p = [ctm deltaPointInMatrixSpace: NSMakePoint(x, y)];
|
||||
|
||||
|
@ -1068,7 +1068,7 @@ typedef enum {
|
|||
[path relativeLineToPoint: p];
|
||||
}
|
||||
|
||||
- (void)DPSrmoveto: (float)x : (float)y
|
||||
- (void)DPSrmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
NSPoint p = [ctm deltaPointInMatrixSpace: NSMakePoint(x, y)];
|
||||
|
||||
|
@ -1086,8 +1086,6 @@ typedef enum {
|
|||
NSInteger count = 10;
|
||||
CGFloat dash_pattern[10];
|
||||
CGFloat phase;
|
||||
float fpattern[10];
|
||||
NSInteger i;
|
||||
|
||||
// Appending to the current path is a lot faster than copying!
|
||||
//ASSIGNCOPY(path, newpath);
|
||||
|
@ -1104,12 +1102,7 @@ typedef enum {
|
|||
[self DPSsetflat: [newpath flatness]];
|
||||
|
||||
[newpath getLineDash: dash_pattern count: &count phase: &phase];
|
||||
// Convert from CGFloat to float
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
fpattern[i] = dash_pattern[i];
|
||||
}
|
||||
[self DPSsetdash: fpattern : count : phase];
|
||||
[self DPSsetdash: dash_pattern : count : phase];
|
||||
}
|
||||
|
||||
- (void) GSRectClipList: (const NSRect *)rects : (int) count
|
||||
|
@ -1148,9 +1141,9 @@ typedef enum {
|
|||
}
|
||||
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix
|
||||
: (int) pixelsWide : (int) pixelsHigh
|
||||
: (int) bitsPerSample : (int) samplesPerPixel
|
||||
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
|
||||
: (NSInteger) pixelsWide : (NSInteger) pixelsHigh
|
||||
: (NSInteger) bitsPerSample : (NSInteger) samplesPerPixel
|
||||
: (NSInteger) bitsPerPixel : (NSInteger) bytesPerRow : (BOOL) isPlanar
|
||||
: (BOOL) hasAlpha : (NSString *) colorSpaceName
|
||||
: (const unsigned char *const [5]) data
|
||||
{
|
||||
|
@ -1283,8 +1276,8 @@ typedef enum {
|
|||
- (void) _fillRect: (NSRect)rect withPattern: (NSImage*)color_pattern
|
||||
{
|
||||
NSSize size;
|
||||
float x;
|
||||
float y;
|
||||
CGFloat x;
|
||||
CGFloat y;
|
||||
NSAffineTransform *ictm;
|
||||
|
||||
// The coordinates we get here are already in device space,
|
||||
|
|
|
@ -134,7 +134,7 @@ fpfloat(FILE *stream, float f)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Color operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSsetalpha: (float)a
|
||||
- (void) DPSsetalpha: (CGFloat)a
|
||||
{
|
||||
[super DPSsetalpha: a];
|
||||
/* This needs to be defined base on the the language level, etc. in
|
||||
|
@ -143,7 +143,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "GSsetalpha\n");
|
||||
}
|
||||
|
||||
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k
|
||||
- (void) DPSsetcmykcolor: (CGFloat)c : (CGFloat)m : (CGFloat)y : (CGFloat)k
|
||||
{
|
||||
[super DPSsetcmykcolor: c : m : y : k];
|
||||
fpfloat(gstream, c);
|
||||
|
@ -153,14 +153,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "setcmykcolor\n");
|
||||
}
|
||||
|
||||
- (void) DPSsetgray: (float)gray
|
||||
- (void) DPSsetgray: (CGFloat)gray
|
||||
{
|
||||
[super DPSsetgray: gray];
|
||||
fpfloat(gstream, gray);
|
||||
fprintf(gstream, "setgray\n");
|
||||
}
|
||||
|
||||
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b
|
||||
- (void) DPSsethsbcolor: (CGFloat)h : (CGFloat)s : (CGFloat)b
|
||||
{
|
||||
[super DPSsethsbcolor: h : s : b];
|
||||
fpfloat(gstream, h);
|
||||
|
@ -169,7 +169,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "sethsbcolor\n");
|
||||
}
|
||||
|
||||
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b
|
||||
- (void) DPSsetrgbcolor: (CGFloat)r : (CGFloat)g : (CGFloat)b
|
||||
{
|
||||
[super DPSsetrgbcolor: r : g : b];
|
||||
fpfloat(gstream, r);
|
||||
|
@ -196,7 +196,7 @@ fpfloat(FILE *stream, float f)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Text operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSashow: (float)x : (float)y : (const char*)s
|
||||
- (void) DPSashow: (CGFloat)x : (CGFloat)y : (const char*)s
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -205,7 +205,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, ") ashow\n");
|
||||
}
|
||||
|
||||
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay : (const char*)s
|
||||
- (void) DPSawidthshow: (CGFloat)cx : (CGFloat)cy : (int)c : (CGFloat)ax : (CGFloat)ay : (const char*)s
|
||||
{
|
||||
fpfloat(gstream, cx);
|
||||
fpfloat(gstream, cy);
|
||||
|
@ -231,7 +231,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, ") show\n");
|
||||
}
|
||||
|
||||
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char*)s
|
||||
- (void) DPSwidthshow: (CGFloat)x : (CGFloat)y : (int)c : (const char*)s
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -240,23 +240,23 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, ") widthshow\n");
|
||||
}
|
||||
|
||||
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSxyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
- (void) DPSyshow: (const char*)s : (const CGFloat*)numarray : (int)size
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
|
||||
- (void) GSSetCharacterSpacing: (float)extra
|
||||
- (void) GSSetCharacterSpacing: (CGFloat)extra
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ fpfloat(FILE *stream, float f)
|
|||
[super GSSetFont: fontref];
|
||||
}
|
||||
|
||||
- (void) GSSetFontSize: (float)size
|
||||
- (void) GSSetFontSize: (CGFloat)size
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ fpfloat(FILE *stream, float f)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Gstate operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offset
|
||||
- (void) DPSsetdash: (const CGFloat*)pat : (NSInteger)size : (CGFloat)offset
|
||||
{
|
||||
int i;
|
||||
fprintf(gstream, "[");
|
||||
|
@ -390,14 +390,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "setdash\n");
|
||||
}
|
||||
|
||||
- (void) DPSsetflat: (float)flatness
|
||||
- (void) DPSsetflat: (CGFloat)flatness
|
||||
{
|
||||
[super DPSsetflat: flatness];
|
||||
fpfloat(gstream, flatness);
|
||||
fprintf(gstream, "setflat\n");
|
||||
}
|
||||
|
||||
- (void) DPSsethalftonephase: (float)x : (float)y
|
||||
- (void) DPSsethalftonephase: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[super DPSsethalftonephase: x : y];
|
||||
fpfloat(gstream, x);
|
||||
|
@ -417,14 +417,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "%d setlinejoin\n", linejoin);
|
||||
}
|
||||
|
||||
- (void) DPSsetlinewidth: (float)width
|
||||
- (void) DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
[super DPSsetlinewidth: width];
|
||||
fpfloat(gstream, width);
|
||||
fprintf(gstream, "setlinewidth\n");
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
[super DPSsetmiterlimit: limit];
|
||||
fpfloat(gstream, limit);
|
||||
|
@ -441,7 +441,7 @@ fpfloat(FILE *stream, float f)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Matrix operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSconcat: (const float*)m
|
||||
- (void) DPSconcat: (const CGFloat*)m
|
||||
{
|
||||
[super DPSconcat: m];
|
||||
|
||||
|
@ -474,14 +474,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "initmatrix\n");
|
||||
}
|
||||
|
||||
- (void) DPSrotate: (float)angle
|
||||
- (void) DPSrotate: (CGFloat)angle
|
||||
{
|
||||
[super DPSrotate: angle];
|
||||
fpfloat(gstream, angle);
|
||||
fprintf(gstream, "rotate\n");
|
||||
}
|
||||
|
||||
- (void) DPSscale: (float)x : (float)y
|
||||
- (void) DPSscale: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[super DPSscale: x : y];
|
||||
fpfloat(gstream, x);
|
||||
|
@ -489,7 +489,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "scale\n");
|
||||
}
|
||||
|
||||
- (void) DPStranslate: (float)x : (float)y
|
||||
- (void) DPStranslate: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
[super DPStranslate: x : y];
|
||||
fpfloat(gstream, x);
|
||||
|
@ -529,7 +529,7 @@ fpfloat(FILE *stream, float f)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* Paint operations */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
|
||||
- (void) DPSarc: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -539,7 +539,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "arc\n");
|
||||
}
|
||||
|
||||
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1 : (float)angle2
|
||||
- (void) DPSarcn: (CGFloat)x : (CGFloat)y : (CGFloat)r : (CGFloat)angle1 : (CGFloat)angle2
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -549,7 +549,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "arcn\n");
|
||||
}
|
||||
|
||||
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r
|
||||
- (void) DPSarct: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2 : (CGFloat)r
|
||||
{
|
||||
fpfloat(gstream, x1);
|
||||
fpfloat(gstream, y1);
|
||||
|
@ -569,8 +569,8 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "closepath\n");
|
||||
}
|
||||
|
||||
- (void)DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3
|
||||
- (void)DPScurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3
|
||||
{
|
||||
fpfloat(gstream, x1);
|
||||
fpfloat(gstream, y1);
|
||||
|
@ -606,14 +606,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "initclip\n");
|
||||
}
|
||||
|
||||
- (void) DPSlineto: (float)x : (float)y
|
||||
- (void) DPSlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
fprintf(gstream, "lineto\n");
|
||||
}
|
||||
|
||||
- (void) DPSmoveto: (float)x : (float)y
|
||||
- (void) DPSmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -625,12 +625,12 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "newpath\n");
|
||||
}
|
||||
|
||||
- (void) DPSpathbbox: (float*)llx : (float*)lly : (float*)urx : (float*)ury
|
||||
- (void) DPSpathbbox: (CGFloat*)llx : (CGFloat*)lly : (CGFloat*)urx : (CGFloat*)ury
|
||||
{
|
||||
}
|
||||
|
||||
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
|
||||
: (float)x3 : (float)y3
|
||||
- (void) DPSrcurveto: (CGFloat)x1 : (CGFloat)y1 : (CGFloat)x2 : (CGFloat)y2
|
||||
: (CGFloat)x3 : (CGFloat)y3
|
||||
{
|
||||
fpfloat(gstream, x1);
|
||||
fpfloat(gstream, y1);
|
||||
|
@ -641,7 +641,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "rcurveto\n");
|
||||
}
|
||||
|
||||
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -650,7 +650,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "rectclip\n");
|
||||
}
|
||||
|
||||
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -659,7 +659,7 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "rectfill\n");
|
||||
}
|
||||
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
- (void) DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -673,14 +673,14 @@ fpfloat(FILE *stream, float f)
|
|||
fprintf(gstream, "reversepath\n");
|
||||
}
|
||||
|
||||
- (void) DPSrlineto: (float)x : (float)y
|
||||
- (void) DPSrlineto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
fprintf(gstream, "rlineto\n");
|
||||
}
|
||||
|
||||
- (void) DPSrmoveto: (float)x : (float)y
|
||||
- (void) DPSrmoveto: (CGFloat)x : (CGFloat)y
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
|
@ -699,7 +699,6 @@ fpfloat(FILE *stream, float f)
|
|||
NSInteger i, count = 10;
|
||||
CGFloat pattern[10];
|
||||
CGFloat phase = 0.0;
|
||||
float fpattern[10];
|
||||
|
||||
[self DPSnewpath];
|
||||
[self DPSsetlinewidth: [path lineWidth]];
|
||||
|
@ -709,13 +708,8 @@ fpfloat(FILE *stream, float f)
|
|||
[self DPSsetflat: [path flatness]];
|
||||
|
||||
[path getLineDash: pattern count: &count phase: &phase];
|
||||
// Convert from CGFloat to float
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
fpattern[i] = pattern[i];
|
||||
}
|
||||
// Always sent the dash pattern. When NULL this will reset to a solid line.
|
||||
[self DPSsetdash: fpattern : count : phase];
|
||||
[self DPSsetdash: pattern : count : phase];
|
||||
|
||||
count = [path elementCount];
|
||||
for (i = 0; i < count; i++)
|
||||
|
@ -798,39 +792,39 @@ fpfloat(FILE *stream, float f)
|
|||
/*-------------------------------------------------------------------------*/
|
||||
/* Graphics Extensions Ops */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
- (void) DPScomposite: (float)x : (float)y : (float)w : (float)h
|
||||
: (int)gstateNum : (float)dx : (float)dy : (int)op
|
||||
- (void) DPScomposite: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
: (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (NSCompositingOperation)op
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
fpfloat(gstream, w);
|
||||
fpfloat(gstream, h);
|
||||
fprintf(gstream, "%d ", gstateNum);
|
||||
fprintf(gstream, "%d ", (int)gstateNum);
|
||||
fpfloat(gstream, dx);
|
||||
fpfloat(gstream, dy);
|
||||
fprintf(gstream, "%d composite\n", op);
|
||||
fprintf(gstream, "%d composite\n", (int)op);
|
||||
}
|
||||
|
||||
- (void) DPScompositerect: (float)x : (float)y : (float)w : (float)h : (int)op
|
||||
- (void) DPScompositerect: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h : (NSCompositingOperation)op
|
||||
{
|
||||
fpfloat(gstream, x);
|
||||
fpfloat(gstream, y);
|
||||
fpfloat(gstream, w);
|
||||
fpfloat(gstream, h);
|
||||
fprintf(gstream, "%d compositerect\n", op);
|
||||
fprintf(gstream, "%d compositerect\n", (int)op);
|
||||
}
|
||||
|
||||
- (void) DPSdissolve: (float)x : (float)y : (float)w : (float)h
|
||||
: (int)gstateNum : (float)dx : (float)dy : (float)delta
|
||||
- (void) DPSdissolve: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
: (NSInteger)gstateNum : (CGFloat)dx : (CGFloat)dy : (CGFloat)delta
|
||||
{
|
||||
NSLog(@"DPSinvalidcontext: dissolve in a stream context");
|
||||
}
|
||||
|
||||
- (void) GScomposite: (int)gstateNum
|
||||
- (void) GScomposite: (NSInteger)gstateNum
|
||||
toPoint: (NSPoint)aPoint
|
||||
fromRect: (NSRect)srcRect
|
||||
operation: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
[self DPScomposite: NSMinX(srcRect) : NSMinY(srcRect) : NSWidth(srcRect) : NSHeight(srcRect)
|
||||
: gstateNum : aPoint.x : aPoint.y : op];
|
||||
|
@ -894,14 +888,14 @@ static const char *hexdigits = "0123456789abcdef";
|
|||
|
||||
@implementation GSStreamContext (Graphics)
|
||||
|
||||
- (void) NSDrawBitmap: (NSRect)rect : (int)pixelsWide : (int)pixelsHigh
|
||||
: (int)bitsPerSample : (int)samplesPerPixel
|
||||
: (int)bitsPerPixel : (int)bytesPerRow : (BOOL)isPlanar
|
||||
- (void) NSDrawBitmap: (NSRect)rect : (NSInteger)pixelsWide : (NSInteger)pixelsHigh
|
||||
: (NSInteger)bitsPerSample : (NSInteger)samplesPerPixel
|
||||
: (NSInteger)bitsPerPixel : (NSInteger)bytesPerRow : (BOOL)isPlanar
|
||||
: (BOOL)hasAlpha : (NSString *)colorSpaceName
|
||||
: (const unsigned char *const [5])data
|
||||
{
|
||||
int bytes, spp;
|
||||
float y;
|
||||
NSInteger bytes, spp;
|
||||
CGFloat y;
|
||||
BOOL flipped = NO;
|
||||
|
||||
/* In a flipped view, we don't want to flip the image again, which would
|
||||
|
@ -927,9 +921,9 @@ static const char *hexdigits = "0123456789abcdef";
|
|||
(bitsPerSample * pixelsWide * pixelsHigh + 7) / 8;
|
||||
if (bytes * samplesPerPixel != bytesPerRow * pixelsHigh)
|
||||
{
|
||||
NSLog(@"Image Rendering Error: Dodgy bytesPerRow value %d", bytesPerRow);
|
||||
NSLog(@"Image Rendering Error: Dodgy bytesPerRow value %d", (int)bytesPerRow);
|
||||
NSLog(@" pixelsHigh=%d, bytes=%d, samplesPerPixel=%d",
|
||||
bytesPerRow, pixelsHigh, bytes);
|
||||
(int)bytesPerRow, (int)pixelsHigh, (int)bytes);
|
||||
return;
|
||||
}
|
||||
if (hasAlpha)
|
||||
|
@ -948,17 +942,17 @@ static const char *hexdigits = "0123456789abcdef";
|
|||
}
|
||||
}
|
||||
fprintf(gstream, "%d %d %d [%d 0 0 %d 0 %d]\n",
|
||||
pixelsWide, pixelsHigh, bitsPerSample, pixelsWide,
|
||||
(flipped) ? pixelsHigh : -pixelsHigh, pixelsHigh);
|
||||
(int)pixelsWide, (int)pixelsHigh, (int)bitsPerSample, (int)pixelsWide,
|
||||
(flipped) ? (int)pixelsHigh : (int)-pixelsHigh, (int)pixelsHigh);
|
||||
fprintf(gstream, "{currentfile %d string readhexstring pop}\n",
|
||||
pixelsWide * spp);
|
||||
fprintf(gstream, "false %d colorimage\n", spp);
|
||||
(int)(pixelsWide * spp));
|
||||
fprintf(gstream, "false %d colorimage\n", (int)spp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(gstream, "%d %d %d [%d 0 0 %d 0 %d]\n",
|
||||
pixelsWide, pixelsHigh, bitsPerSample, pixelsWide,
|
||||
(flipped) ? pixelsHigh : -pixelsHigh, pixelsHigh);
|
||||
(int)pixelsWide, (int)pixelsHigh, (int)bitsPerSample, (int)pixelsWide,
|
||||
(flipped) ? (int)pixelsHigh : (int)-pixelsHigh, (int)pixelsHigh);
|
||||
fprintf(gstream, "currentfile image\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ BOOL alpha_blend_source_over(HDC destDC,
|
|||
HDC srcDC,
|
||||
RECT rectFrom,
|
||||
int x, int y, int w, int h,
|
||||
float delta)
|
||||
CGFloat delta)
|
||||
{
|
||||
BOOL success = YES;
|
||||
|
||||
|
@ -302,7 +302,7 @@ BOOL alpha_blend_source_over(HDC destDC,
|
|||
fromRect: (NSRect)sourceRect
|
||||
toPoint: (NSPoint)destPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
HDC sourceDC;
|
||||
HDC hDC;
|
||||
|
@ -408,7 +408,7 @@ BOOL alpha_blend_source_over(HDC destDC,
|
|||
- (void) compositerect: (NSRect)aRect
|
||||
op: (NSCompositingOperation)op
|
||||
{
|
||||
float gray;
|
||||
CGFloat gray;
|
||||
|
||||
// FIXME: This is taken from the xlib backend
|
||||
[self DPScurrentgray: &gray];
|
||||
|
@ -462,7 +462,7 @@ BOOL alpha_blend_source_over(HDC destDC,
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
HDC sourceDC;
|
||||
HDC hDC;
|
||||
|
@ -569,9 +569,9 @@ BOOL alpha_blend_source_over(HDC destDC,
|
|||
}
|
||||
|
||||
static
|
||||
HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
|
||||
int bitsPerSample, int samplesPerPixel,
|
||||
int bitsPerPixel, int bytesPerRow,
|
||||
HBITMAP GSCreateBitmap(HDC hDC, NSInteger pixelsWide, NSInteger pixelsHigh,
|
||||
NSInteger bitsPerSample, NSInteger samplesPerPixel,
|
||||
NSInteger bitsPerPixel, NSInteger bytesPerRow,
|
||||
BOOL isPlanar, BOOL hasAlpha,
|
||||
NSString *colorSpaceName,
|
||||
const unsigned char *const data[5])
|
||||
|
@ -902,9 +902,9 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
|
|||
// -DPSimage: can cause images to be drawn with a 1px horizontal line cut at
|
||||
// the top. That's why -DPSimage we still use the GDI top left coordinates.
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix
|
||||
: (int) pixelsWide : (int) pixelsHigh
|
||||
: (int) bitsPerSample : (int) samplesPerPixel
|
||||
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
|
||||
: (NSInteger) pixelsWide : (NSInteger) pixelsHigh
|
||||
: (NSInteger) bitsPerSample : (NSInteger) samplesPerPixel
|
||||
: (NSInteger) bitsPerPixel : (NSInteger) bytesPerRow : (BOOL) isPlanar
|
||||
: (BOOL) hasAlpha : (NSString *) colorSpaceName
|
||||
: (const unsigned char *const [5]) data
|
||||
{
|
||||
|
@ -1249,30 +1249,23 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
|
|||
}
|
||||
|
||||
|
||||
- (void) DPSsetdash: (const float*)thePattern : (int)count : (float)phase
|
||||
- (void) DPSsetdash: (const CGFloat*)thePattern : (NSInteger)count : (CGFloat)phase
|
||||
{
|
||||
CGFloat pattern[count];
|
||||
|
||||
if (!path)
|
||||
{
|
||||
path = [NSBezierPath new];
|
||||
}
|
||||
|
||||
// Convert from float to CGFloat
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
pattern[i] = thePattern[i];
|
||||
}
|
||||
// FIXME: Convert to ctm first
|
||||
[path setLineDash: pattern count: count phase: phase];
|
||||
[path setLineDash: thePattern count: count phase: phase];
|
||||
}
|
||||
|
||||
- (void)DPScurrentmiterlimit: (float *)limit
|
||||
- (void)DPScurrentmiterlimit: (CGFloat *)limit
|
||||
{
|
||||
*limit = miterlimit;
|
||||
}
|
||||
|
||||
- (void)DPSsetmiterlimit: (float)limit
|
||||
- (void)DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
// FIXME: Convert to ctm first
|
||||
miterlimit = limit;
|
||||
|
@ -1298,12 +1291,12 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
|
|||
joinStyle = linejoin;
|
||||
}
|
||||
|
||||
- (void)DPScurrentlinewidth: (float *)width
|
||||
- (void)DPScurrentlinewidth: (CGFloat *)width
|
||||
{
|
||||
*width = lineWidth;
|
||||
}
|
||||
|
||||
- (void)DPSsetlinewidth: (float)width
|
||||
- (void)DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
// FIXME: Convert to ctm first
|
||||
lineWidth = width;
|
||||
|
|
|
@ -471,7 +471,7 @@ static Region emptyRegion;
|
|||
dest_win->depth);
|
||||
|
||||
/* Fill alpha also (opaque by default) */
|
||||
[self setAlphaColor: 1];
|
||||
[self setAlphaColor: 1.0];
|
||||
XFillRectangle(XDPY, dest_win->alpha_buffer, agcntxt, 0, 0,
|
||||
NSWidth(dest_win->xframe), NSHeight(dest_win->xframe));
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ static Region emptyRegion;
|
|||
fromRect: (NSRect) fromRect
|
||||
toPoint: (NSPoint) toPoint
|
||||
op: (NSCompositingOperation) op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
XRectangle srect;
|
||||
XRectangle drect;
|
||||
|
@ -639,7 +639,7 @@ static Region emptyRegion;
|
|||
fromRect: (NSRect)aRect
|
||||
toPoint: (NSPoint)aPoint
|
||||
op: (NSCompositingOperation)op
|
||||
fraction: (float)delta
|
||||
fraction: (CGFloat)delta
|
||||
{
|
||||
BOOL do_copy, source_alpha;
|
||||
XGCValues comp_gcv;
|
||||
|
@ -780,7 +780,7 @@ static Region emptyRegion;
|
|||
- (void) compositerect: (NSRect)aRect
|
||||
op: (NSCompositingOperation)op
|
||||
{
|
||||
float gray;
|
||||
CGFloat gray;
|
||||
|
||||
[self DPScurrentgray: &gray];
|
||||
if (fabs(gray - 0.667) < 0.005)
|
||||
|
@ -1234,7 +1234,7 @@ static Region emptyRegion;
|
|||
|
||||
@implementation XGGState (Ops)
|
||||
|
||||
- (void) DPSsetalpha: (float)a
|
||||
- (void) DPSsetalpha: (CGFloat)a
|
||||
{
|
||||
gswindow_device_t *gs_win;
|
||||
[super DPSsetalpha: a];
|
||||
|
@ -1373,7 +1373,7 @@ static Region emptyRegion;
|
|||
*linejoin = gcv.join_style - JoinMiter;
|
||||
}
|
||||
|
||||
- (void)DPScurrentlinewidth: (float *)width
|
||||
- (void)DPScurrentlinewidth: (CGFloat *)width
|
||||
{
|
||||
*width = gcv.line_width;
|
||||
}
|
||||
|
@ -1386,7 +1386,7 @@ static Region emptyRegion;
|
|||
clipregion = 0;
|
||||
}
|
||||
|
||||
- (void)DPSsetdash: (const float *)pat : (int)size : (float)pat_offset
|
||||
- (void)DPSsetdash: (const CGFloat *)pat : (NSInteger)size : (CGFloat)pat_offset
|
||||
{
|
||||
int dash_offset;
|
||||
char dash_list[size];
|
||||
|
@ -1427,7 +1427,7 @@ static Region emptyRegion;
|
|||
[self setGCValues: gcv withMask: GCJoinStyle];
|
||||
}
|
||||
|
||||
- (void)DPSsetlinewidth: (float)width
|
||||
- (void)DPSsetlinewidth: (CGFloat)width
|
||||
{
|
||||
int w;
|
||||
NSSize ws;
|
||||
|
@ -1451,7 +1451,7 @@ static Region emptyRegion;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) DPSsetmiterlimit: (float)limit
|
||||
- (void) DPSsetmiterlimit: (CGFloat)limit
|
||||
{
|
||||
/* Do nothing. X11 does its own thing and doesn't give us a choice */
|
||||
}
|
||||
|
@ -1505,7 +1505,7 @@ static Region emptyRegion;
|
|||
[self setClipMask];
|
||||
}
|
||||
|
||||
- (void)DPSrectclip: (float)x : (float)y : (float)w : (float)h
|
||||
- (void)DPSrectclip: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
XRectangle xrect;
|
||||
NSRect orect;
|
||||
|
@ -1532,7 +1532,7 @@ static Region emptyRegion;
|
|||
[self DPSnewpath];
|
||||
}
|
||||
|
||||
- (void)DPSrectfill: (float)x : (float)y : (float)w : (float)h
|
||||
- (void)DPSrectfill: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
XRectangle bounds;
|
||||
|
||||
|
@ -1578,7 +1578,7 @@ NSDebugLLog(@"XGGraphics", @"Fill %@ X rect %d,%d,%d,%d",
|
|||
}
|
||||
}
|
||||
|
||||
- (void)DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
- (void)DPSrectstroke: (CGFloat)x : (CGFloat)y : (CGFloat)w : (CGFloat)h
|
||||
{
|
||||
XRectangle bounds;
|
||||
|
||||
|
@ -1620,9 +1620,9 @@ NSDebugLLog(@"XGGraphics", @"Fill %@ X rect %d,%d,%d,%d",
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* NSGraphics Ops */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix : (int) pixelsWide : (int) pixelsHigh
|
||||
: (int) bitsPerSample : (int) samplesPerPixel
|
||||
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
|
||||
- (void)DPSimage: (NSAffineTransform*) matrix : (NSInteger) pixelsWide : (NSInteger) pixelsHigh
|
||||
: (NSInteger) bitsPerSample : (NSInteger) samplesPerPixel
|
||||
: (NSInteger) bitsPerPixel : (NSInteger) bytesPerRow : (BOOL) isPlanar
|
||||
: (BOOL) hasAlpha : (NSString *) colorSpaceName
|
||||
: (const unsigned char *const [5]) data
|
||||
{
|
||||
|
@ -1640,8 +1640,8 @@ NSDebugLLog(@"XGGraphics", @"Fill %@ X rect %d,%d,%d,%d",
|
|||
rect = NSZeroRect;
|
||||
one_is_black = NO;
|
||||
cspace = rgb_colorspace;
|
||||
rect.size.width = (float) pixelsWide;
|
||||
rect.size.height = (float) pixelsHigh;
|
||||
rect.size.width = (CGFloat) pixelsWide;
|
||||
rect.size.height = (CGFloat) pixelsHigh;
|
||||
|
||||
// default is 8 bit grayscale
|
||||
if (!bitsPerSample)
|
||||
|
|
Loading…
Reference in a new issue