mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 01:11:00 +00:00
Correct drawing of pattern colour.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@28911 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f1db2bf071
commit
197c45e3f5
2 changed files with 28 additions and 11 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,23 +1,30 @@
|
||||||
|
2009-10-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/gsc/GSGState.m (-_fillRect:withPattern:): Convert the
|
||||||
|
drawing coordinate back in user space.
|
||||||
|
|
||||||
2009-10-28 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
2009-10-28 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
||||||
|
|
||||||
* Source/x11/XGGLFormat.m
|
* Source/x11/XGGLFormat.m
|
||||||
Check for GLX_VERSION_1_4.
|
Check for GLX_VERSION_1_4.
|
||||||
|
|
||||||
2009-10-28 Riccardo Mottola <rmottola@users.sf.net>
|
2009-10-28 Riccardo Mottola <rmottola@users.sf.net>
|
||||||
|
|
||||||
* Source/x11/XGGLFormat.m
|
* Source/x11/XGGLFormat.m
|
||||||
cleaned up c99-isms
|
cleaned up c99-isms
|
||||||
|
|
||||||
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
||||||
|
|
||||||
* Source/x11/XGServerWindow.m
|
* Source/x11/XGServerWindow.m
|
||||||
Implement setMouseLocation:onScreen:.
|
Implement setMouseLocation:onScreen:.
|
||||||
|
|
||||||
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
2009-10-25 Thomas Gamper <icicle@cg.tuwien.ac.at>
|
||||||
|
|
||||||
* Source/x11/XGGLContext.m
|
* Source/x11/XGGLContext.m
|
||||||
* Source/x11/XGGLFormat.m
|
* Source/x11/XGGLFormat.m
|
||||||
* Headers/x11/XGOpenGL.h
|
* Headers/x11/XGOpenGL.h
|
||||||
Clean up OpenGL stuff, reformat code and add Multisampling
|
Clean up OpenGL stuff, reformat code and add Multisampling
|
||||||
support.
|
support.
|
||||||
|
|
||||||
2009-10-23 Fred Kiefer <FredKiefer@gmx.de>
|
2009-10-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
|
|
@ -1236,6 +1236,12 @@ typedef enum {
|
||||||
NSSize size;
|
NSSize size;
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
|
NSAffineTransform *ictm;
|
||||||
|
|
||||||
|
// The coordinates we get here are already in device space,
|
||||||
|
// but compositeToPoint needs user space coordinates
|
||||||
|
ictm = [ctm copyWithZone: GSObjCZone(self)];
|
||||||
|
[ictm invert];
|
||||||
|
|
||||||
size = [pattern size];
|
size = [pattern size];
|
||||||
y = floor(NSMinY(rect) / size.height) * size.height;
|
y = floor(NSMinY(rect) / size.height) * size.height;
|
||||||
|
@ -1243,13 +1249,17 @@ typedef enum {
|
||||||
{
|
{
|
||||||
x = floor(NSMinX(rect) / size.width) * size.width;
|
x = floor(NSMinX(rect) / size.width) * size.width;
|
||||||
while (x < NSMaxX(rect))
|
while (x < NSMaxX(rect))
|
||||||
{
|
{
|
||||||
[color_pattern compositeToPoint: NSMakePoint(x, y)
|
NSPoint p = NSMakePoint(x, y);
|
||||||
|
|
||||||
|
p = [ictm pointInMatrixSpace: p];
|
||||||
|
[color_pattern compositeToPoint: p
|
||||||
operation: NSCompositeSourceOver];
|
operation: NSCompositeSourceOver];
|
||||||
x += size.width;
|
x += size.width;
|
||||||
}
|
}
|
||||||
y += size.height;
|
y += size.height;
|
||||||
}
|
}
|
||||||
|
RELEASE(ictm);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) fillRect: (NSRect)rect withPattern: (NSImage*)color_pattern
|
- (void) fillRect: (NSRect)rect withPattern: (NSImage*)color_pattern
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue