mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Fix for bug #30140. The code was not converting the rectangle for
pattern drawing into device space. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31044 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c4c6268f45
commit
9eca3a5075
4 changed files with 28 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2010-07-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/gsc/GSGState.m (-fillRect:withPattern:): Don't use an
|
||||
autoreleased bezier path.
|
||||
* Source/art/path.m (-DPSrectfill::::),
|
||||
* Source/xlib/XGGState.m (-DPSrectfill::::): Use
|
||||
-fillPath:withPattern: not -fillRect:withPattern: as the rect needs
|
||||
to be converted first.
|
||||
|
||||
2010-07-26 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/win32/WIN32Server.m,
|
||||
|
|
|
@ -984,7 +984,13 @@ static void clip_svp_callback(void *data, int y, int start,
|
|||
|
||||
if (pattern != nil)
|
||||
{
|
||||
[self fillRect: NSMakeRect(x, y, w, h) withPattern: pattern];
|
||||
NSBezierPath *path;
|
||||
|
||||
path = [[NSBezierPath alloc] init];
|
||||
[path appendBezierPathWithRect: NSMakeRect(x, y, w, h)];
|
||||
[path transformUsingAffineTransform: ctm];
|
||||
[self fillPath: path withPattern: pattern];
|
||||
RELEASE(path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1255,7 +1255,8 @@ typedef enum {
|
|||
|
||||
size = [pattern size];
|
||||
y = floor(NSMinY(rect) / size.height) * size.height;
|
||||
while (y < NSMaxY(rect))
|
||||
|
||||
while (y < NSMaxY(rect))
|
||||
{
|
||||
x = floor(NSMinX(rect) / size.width) * size.width;
|
||||
while (x < NSMaxX(rect))
|
||||
|
@ -1278,12 +1279,14 @@ typedef enum {
|
|||
void *oldClip;
|
||||
|
||||
oldClip = [self saveClip];
|
||||
path = [NSBezierPath bezierPathWithRect: rect];
|
||||
path = [[NSBezierPath alloc] init];
|
||||
[path appendBezierPathWithRect: rect];
|
||||
[self DPSclip];
|
||||
|
||||
[self _fillRect: rect withPattern: color_pattern];
|
||||
|
||||
[self restoreClip: oldClip];
|
||||
RELEASE(path);
|
||||
path = oldPath;
|
||||
}
|
||||
|
||||
|
|
|
@ -1541,7 +1541,13 @@ static Region emptyRegion;
|
|||
|
||||
if (pattern != nil)
|
||||
{
|
||||
[self fillRect: NSMakeRect(x, y, w, h) withPattern: pattern];
|
||||
NSBezierPath *path;
|
||||
|
||||
path = [[NSBezierPath alloc] init];
|
||||
[path appendBezierPathWithRect: NSMakeRect(x, y, w, h)];
|
||||
[path transformUsingAffineTransform: ctm];
|
||||
[self fillPath: path withPattern: pattern];
|
||||
RELEASE(path);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue