mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:00:47 +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
5256961369
commit
1882cdfe9a
4 changed files with 47 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2001-11-08 Laurent Julliard <laurent@julliard-online.org>
|
||||||
|
* Headers/gnustep/gui/NSGraphics.h
|
||||||
|
* Source/Functions.m
|
||||||
|
* Source/NSImageCell.m:
|
||||||
|
NSDrawFramePhoto added. Needed by the ImageView inspector in Gorm
|
||||||
|
|
||||||
2001-11-06 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
2001-11-06 Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
|
||||||
* Source/NSTableView.m [- sizeToFit]: replaced floorf with floor
|
* Source/NSTableView.m [- sizeToFit]: replaced floorf with floor
|
||||||
suggestion from Stephen Brandon <stephen@brandonitconsulting.co.uk>
|
suggestion from Stephen Brandon <stephen@brandonitconsulting.co.uk>
|
||||||
|
|
|
@ -164,10 +164,12 @@ NSRectFillListWithGrays(const NSRect *rects,const float *grays,int count)
|
||||||
APPKIT_DECLARE NSRect NSDrawTiledRects(NSRect aRect,const NSRect clipRect,
|
APPKIT_DECLARE NSRect NSDrawTiledRects(NSRect aRect,const NSRect clipRect,
|
||||||
const NSRectEdge * sides,
|
const NSRectEdge * sides,
|
||||||
const float *grays, int count);
|
const float *grays, int count);
|
||||||
APPKIT_DECLARE void NSDrawButton(const NSRect aRect, const NSRect clipRect);
|
|
||||||
APPKIT_DECLARE void NSDrawGrayBezel(const NSRect aRect, const NSRect clipRect);
|
APPKIT_EXPORT void NSDrawButton(const NSRect aRect, const NSRect clipRect);
|
||||||
APPKIT_DECLARE void NSDrawGroove(const NSRect aRect, const NSRect clipRect);
|
APPKIT_EXPORT void NSDrawGrayBezel(const NSRect aRect, const NSRect clipRect);
|
||||||
APPKIT_DECLARE void NSDrawWhiteBezel(const NSRect aRect, const NSRect clipRect);
|
APPKIT_EXPORT void NSDrawGroove(const NSRect aRect, const NSRect clipRect);
|
||||||
|
APPKIT_EXPORT void NSDrawWhiteBezel(const NSRect aRect, const NSRect clipRect);
|
||||||
|
APPKIT_EXPORT void NSDrawFramePhoto(const NSRect aRect, const NSRect clipRect);
|
||||||
|
|
||||||
// This is from an old version of the specification
|
// This is from an old version of the specification
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
@ -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
|
void
|
||||||
NSDrawWindowBackground(NSRect aRect)
|
NSDrawWindowBackground(NSRect aRect)
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,7 +119,9 @@
|
||||||
// nada
|
// nada
|
||||||
break;
|
break;
|
||||||
case NSImageFramePhoto:
|
case NSImageFramePhoto:
|
||||||
// FIXME
|
[controlView lockFocus];
|
||||||
|
NSDrawFramePhoto(cellFrame, NSZeroRect);
|
||||||
|
[controlView unlockFocus];
|
||||||
break;
|
break;
|
||||||
case NSImageFrameGrayBezel:
|
case NSImageFrameGrayBezel:
|
||||||
[controlView lockFocus];
|
[controlView lockFocus];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue