mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Correct code for handling flipped view in NSDrawBitmap::::...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26306 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4056dce19b
commit
7f2c788745
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-03-15 19:35-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/gsc/GSStreamContext.m: Correct call in NSDrawBitmap::::...
|
||||
to add NSHeight, not NSWidth to the y coordinate if it's flipped.
|
||||
|
||||
2008-03-15 17:48-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/gsc/GSStreamContext.m: Added implementation for GSDrawImage.
|
||||
|
|
|
@ -832,6 +832,7 @@ fpfloat(FILE *stream, float f)
|
|||
|
||||
if([image isKindOfClass: [NSBitmapImageRep class]])
|
||||
{
|
||||
fprintf(gstream,"%% BeginImage\n");
|
||||
[image getBitmapDataPlanes: imagePlanes];
|
||||
[self NSDrawBitmap: rect
|
||||
: [image pixelsWide]
|
||||
|
@ -844,6 +845,7 @@ fpfloat(FILE *stream, float f)
|
|||
: [image hasAlpha]
|
||||
: [image colorSpaceName]
|
||||
: (const unsigned char **)imagePlanes];
|
||||
fprintf(gstream,"%% EndImage\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -900,7 +902,7 @@ static const char *hexdigits = "0123456789abcdef";
|
|||
fprintf(gstream, "matrix\ncurrentmatrix\n");
|
||||
y = NSMinY(rect);
|
||||
if (flipped)
|
||||
y += NSWidth(rect);
|
||||
y += NSHeight(rect);
|
||||
fpfloat(gstream, NSMinX(rect));
|
||||
fpfloat(gstream, y);
|
||||
fprintf(gstream, "translate ");
|
||||
|
|
Loading…
Reference in a new issue