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:
Eric Wasylishen 2013-07-03 16:19:24 +00:00
parent 571a79bd47
commit 520993931f
3 changed files with 33 additions and 0 deletions

View file

@ -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,