mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 20:49:13 +00:00
Add NSDrawThreePartImage
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36824 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
db5b56b068
commit
f9a2310183
3 changed files with 33 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-07-03 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/Functions.m:
|
||||
* Headers/AppKit/NSGraphics.h: Add NSDrawThreePartImage
|
||||
|
||||
2013-07-02 German A. Arias <german@xelalug.org>
|
||||
|
||||
* Source/NSCursor.m (-push): Revert last change.
|
||||
|
|
|
@ -184,6 +184,11 @@ APPKIT_EXPORT void NSDrawBitmap(NSRect rect,
|
|||
NSString *colorSpaceName,
|
||||
const unsigned char *const data[5]);
|
||||
|
||||
APPKIT_EXPORT void
|
||||
NSDrawThreePartImage(NSRect aRect, NSImage *start, NSImage *middle,
|
||||
NSImage *end, BOOL isVertical, NSCompositingOperation op,
|
||||
CGFloat fraction, BOOL flipped);
|
||||
|
||||
APPKIT_EXPORT void
|
||||
NSDrawNinePartImage(NSRect aRect, NSImage *topLeft, NSImage *topMiddle,
|
||||
NSImage *topRight, NSImage *centerLeft,
|
||||
|
|
|
@ -393,6 +393,29 @@ static void GSDrawRepeatingImage(NSRect aRect, NSImage *image, NSCompositingOper
|
|||
[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
|
||||
void NSDrawThreePartImage(NSRect aRect, NSImage *start, NSImage *middle,
|
||||
NSImage *end, BOOL isVertical, NSCompositingOperation op,
|
||||
CGFloat fraction, BOOL flipped)
|
||||
{
|
||||
if (isVertical)
|
||||
{
|
||||
NSDrawNinePartImage(aRect,
|
||||
nil, start, nil,
|
||||
nil, middle, nil,
|
||||
nil, end, nil,
|
||||
op, fraction, flipped);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDrawNinePartImage(aRect,
|
||||
nil, nil, nil,
|
||||
start, middle, end,
|
||||
nil, nil, nil,
|
||||
op, fraction, flipped);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void NSDrawNinePartImage(NSRect aRect, NSImage *topLeft, NSImage *topMiddle,
|
||||
NSImage *topRight, NSImage *centerLeft,
|
||||
NSImage *centerMiddle, NSImage *centerRight,
|
||||
|
|
Loading…
Reference in a new issue