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:
Laurent Julliard 2001-11-08 13:34:23 +00:00
parent 636dabc0ec
commit 81915f4a3c
4 changed files with 47 additions and 5 deletions

View file

@ -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)
{

View file

@ -119,7 +119,9 @@
// nada
break;
case NSImageFramePhoto:
// FIXME
[controlView lockFocus];
NSDrawFramePhoto(cellFrame, NSZeroRect);
[controlView unlockFocus];
break;
case NSImageFrameGrayBezel:
[controlView lockFocus];