mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:17:39 +00:00
NSDrawFramePhoto added
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11340 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
636dabc0ec
commit
81915f4a3c
4 changed files with 47 additions and 5 deletions
|
@ -547,6 +547,38 @@ NSDrawLightBezel(NSRect aRect, NSRect clipRect)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
NSDrawFramePhoto(const NSRect aRect, const NSRect clipRect)
|
||||
{
|
||||
NSRectEdge up_sides[] = {NSMaxXEdge, NSMinYEdge,
|
||||
NSMinXEdge, NSMaxYEdge,
|
||||
NSMaxXEdge, NSMinYEdge};
|
||||
NSRectEdge down_sides[] = {NSMaxXEdge, NSMaxYEdge,
|
||||
NSMinXEdge, NSMinYEdge,
|
||||
NSMaxXEdge, NSMaxYEdge};
|
||||
float grays[] = {NSDarkGray, NSDarkGray,
|
||||
NSDarkGray, NSDarkGray,
|
||||
NSBlack, NSBlack};
|
||||
|
||||
NSRect rect;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
|
||||
if (GSWViewIsFlipped(ctxt) == YES)
|
||||
{
|
||||
rect = NSDrawTiledRects(aRect, clipRect,
|
||||
down_sides, grays, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
rect = NSDrawTiledRects(aRect, clipRect,
|
||||
up_sides, grays, 6);
|
||||
}
|
||||
|
||||
DPSsetgray(ctxt, NSLightGray);
|
||||
DPSrectfill(ctxt, NSMinX(rect), NSMinY(rect),
|
||||
NSWidth(rect), NSHeight(rect));
|
||||
}
|
||||
|
||||
void
|
||||
NSDrawWindowBackground(NSRect aRect)
|
||||
{
|
||||
|
|
|
@ -119,7 +119,9 @@
|
|||
// nada
|
||||
break;
|
||||
case NSImageFramePhoto:
|
||||
// FIXME
|
||||
[controlView lockFocus];
|
||||
NSDrawFramePhoto(cellFrame, NSZeroRect);
|
||||
[controlView unlockFocus];
|
||||
break;
|
||||
case NSImageFrameGrayBezel:
|
||||
[controlView lockFocus];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue