mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:07:39 +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
571a79bd47
commit
520993931f
3 changed files with 33 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue