mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
Handle NSBackingStoreUnretained.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14460 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4b78053b0b
commit
19aa16c74d
6 changed files with 99 additions and 73 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-09-16 16:36 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ARTGState.h, Source/art/ARTContext.m,
|
||||
Source/art/image.m, Source/art/composite.m, Source/art/path.m:
|
||||
Handle NSBackingStoreNonretained.
|
||||
|
||||
2002-09-14 13:39 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/art/ftfont.m: Keep track of the family name in FTFaceInfo
|
||||
|
|
|
@ -211,25 +211,26 @@ very expensive
|
|||
|
||||
- (void) DPSshow: (const char*)s
|
||||
{
|
||||
NSPoint p;
|
||||
int x,y;
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
|
||||
if ([path isEmpty]) return;
|
||||
p=[path currentPoint];
|
||||
if ([path isEmpty]) return;
|
||||
p = [path currentPoint];
|
||||
|
||||
x=p.x;
|
||||
y=wi->sy-p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1:CLIP_DATA:wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
drawinfo: &DI];
|
||||
x = p.x;
|
||||
y = wi->sy - p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1 : CLIP_DATA : wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
drawinfo: &DI];
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char*)s
|
||||
|
@ -239,71 +240,74 @@ very expensive
|
|||
|
||||
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x,y;
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
|
||||
if ([path isEmpty]) return;
|
||||
p=[path currentPoint];
|
||||
if ([path isEmpty]) return;
|
||||
p = [path currentPoint];
|
||||
|
||||
x=p.x;
|
||||
y=wi->sy-p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1:CLIP_DATA:wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 1];
|
||||
x = p.x;
|
||||
y = wi->sy - p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1 : CLIP_DATA : wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 1];
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x,y;
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
|
||||
if ([path isEmpty]) return;
|
||||
p=[path currentPoint];
|
||||
if ([path isEmpty]) return;
|
||||
p = [path currentPoint];
|
||||
|
||||
x=p.x;
|
||||
y=wi->sy-p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1:CLIP_DATA:wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 3];
|
||||
x = p.x;
|
||||
y = wi->sy - p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1 : CLIP_DATA : wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 3];
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size
|
||||
{
|
||||
NSPoint p;
|
||||
int x,y;
|
||||
NSPoint p;
|
||||
int x, y;
|
||||
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
if (!wi || !wi->data) return;
|
||||
if (all_clipped)
|
||||
return;
|
||||
|
||||
if ([path isEmpty]) return;
|
||||
p=[path currentPoint];
|
||||
if ([path isEmpty]) return;
|
||||
p = [path currentPoint];
|
||||
|
||||
x=p.x;
|
||||
y=wi->sy-p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1:CLIP_DATA:wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 2];
|
||||
x = p.x;
|
||||
y = wi->sy - p.y;
|
||||
[(id<FTFontInfo>)[font fontInfo]
|
||||
drawString: s
|
||||
at: x:y
|
||||
to: clip_x0:clip_y0:clip_x1:clip_y1 : CLIP_DATA : wi->bytes_per_line
|
||||
color: fill_color[0]:fill_color[1]:fill_color[2]:fill_color[3]
|
||||
transform: ctm
|
||||
deltas: numarray : size : 2];
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,6 +84,14 @@
|
|||
@end
|
||||
|
||||
|
||||
#define UPDATE_UNBUFFERED \
|
||||
if (wi->window->type==NSBackingStoreNonretained) \
|
||||
{ \
|
||||
[wi _exposeRect: NSMakeRect(clip_x0,clip_y0,clip_sx,clip_sy)]; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern struct draw_info_s ART_DI;
|
||||
#define DI ART_DI
|
||||
|
||||
|
|
|
@ -818,6 +818,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
}
|
||||
}
|
||||
}
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
|
||||
|
@ -1016,7 +1017,6 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
if (!DI.inline_alpha)
|
||||
memset(dst_alpha, 0, n);
|
||||
)
|
||||
return;
|
||||
}
|
||||
else if (op == NSCompositeHighlight)
|
||||
{
|
||||
|
@ -1028,7 +1028,6 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
(*d) ^= 0xff;
|
||||
}
|
||||
)
|
||||
return;
|
||||
}
|
||||
else if (op == NSCompositeCopy)
|
||||
{
|
||||
|
@ -1061,7 +1060,6 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
memset(dst_alpha, ri.a, n);
|
||||
}
|
||||
)
|
||||
return;
|
||||
}
|
||||
else if (blit_func)
|
||||
{
|
||||
|
@ -1110,13 +1108,15 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
|
|||
c.dsta = dst_alpha;
|
||||
blit_func(&c, n);
|
||||
)
|
||||
return;
|
||||
}
|
||||
|
||||
NSLog(@"unimplemented compositerect: (%g %g)+(%g %g) op: %i",
|
||||
aRect.origin.x, aRect.origin.y,
|
||||
aRect.size.width, aRect.size.height,
|
||||
op);
|
||||
else
|
||||
{
|
||||
NSLog(@"unimplemented compositerect: (%g %g)+(%g %g) op: %i",
|
||||
aRect.origin.x, aRect.origin.y,
|
||||
aRect.size.width, aRect.size.height,
|
||||
op);
|
||||
}
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -615,6 +615,7 @@ seem to cause edges to be off by a pixel
|
|||
}
|
||||
}
|
||||
}
|
||||
UPDATE_UNBUFFERED
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -633,6 +634,7 @@ seem to cause edges to be off by a pixel
|
|||
(samplesPerPixel == 4 && hasAlpha)))
|
||||
{
|
||||
[self _image_do_rgb_transform: &ii : matrix : _image_get_color_rgb_8];
|
||||
UPDATE_UNBUFFERED
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -652,6 +654,7 @@ seem to cause edges to be off by a pixel
|
|||
{
|
||||
[self _image_do_rgb_transform: &ii : matrix :
|
||||
_image_get_color_rgb_cmyk_gray];
|
||||
UPDATE_UNBUFFERED
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -866,6 +866,8 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
art_svp_free(svp);
|
||||
|
||||
[path removeAllPoints];
|
||||
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSeofill
|
||||
|
@ -906,6 +908,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
&DI, clip_span, clip_index);
|
||||
|
||||
art_svp_free(svp);
|
||||
UPDATE_UNBUFFERED
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -977,6 +980,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
RENDER_RUN_ALPHA(&ri, x1);
|
||||
}
|
||||
}
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1032,6 +1036,7 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
&DI, clip_span, clip_index);
|
||||
|
||||
art_svp_free(svp);
|
||||
UPDATE_UNBUFFERED
|
||||
}
|
||||
|
||||
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h
|
||||
|
|
Loading…
Reference in a new issue