mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Add shadow method to NSGraphicsContext and add set method to NSShadow
This commit is contained in:
parent
345b1b4065
commit
9fab419042
3 changed files with 16 additions and 1 deletions
|
@ -49,6 +49,7 @@
|
|||
@class NSSet;
|
||||
@class NSBitmapImageRep;
|
||||
@class NSGradient;
|
||||
@class NSShadow;
|
||||
|
||||
typedef struct CGContext *CGContextRef;
|
||||
|
||||
|
@ -188,6 +189,7 @@ APPKIT_EXPORT_CLASS
|
|||
void *_graphicsPort;
|
||||
BOOL _isFlipped;
|
||||
NSCompositingOperation _compositingOperation;
|
||||
NSShadow *_shadow;
|
||||
}
|
||||
|
||||
+ (BOOL) currentContextDrawingToScreen;
|
||||
|
@ -268,6 +270,10 @@ APPKIT_EXPORT NSGraphicsContext *GSCurrentContext(void);
|
|||
|
||||
/* Private backend methods */
|
||||
+ (void) handleExposeRect: (NSRect)rect forDriver: (void *)driver;
|
||||
|
||||
/* Private method for handling shadows */
|
||||
- (void) setShadow: (NSShadow *)shadow;
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
|
|
@ -320,6 +320,7 @@ NSGraphicsContext *GSCurrentContext(void)
|
|||
DESTROY(focus_stack);
|
||||
DESTROY(context_data);
|
||||
DESTROY(context_info);
|
||||
DESTROY(_shadow);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -515,6 +516,12 @@ NSGraphicsContext *GSCurrentContext(void)
|
|||
{
|
||||
}
|
||||
|
||||
/* Private method for handling shadows */
|
||||
- (void) setShadow: (NSShadow *)shadow
|
||||
{
|
||||
ASSIGN(_shadow, shadow);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSGraphicsContext (Private)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#import <Foundation/NSString.h>
|
||||
#import "AppKit/NSShadow.h"
|
||||
#import "AppKit/NSColor.h"
|
||||
#import "AppKit/NSGraphicsContext.h"
|
||||
|
||||
@implementation NSShadow
|
||||
|
||||
|
@ -96,7 +97,8 @@
|
|||
|
||||
- (void) set
|
||||
{
|
||||
// FIXME: Implement
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
[ctxt setShadow: self];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
|
|
Loading…
Reference in a new issue