mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:10:38 +00:00
Add PICT skeleton
This commit is contained in:
parent
10a81f89f3
commit
c3bd876fa5
2 changed files with 41 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
#define _NSPICTImageRep_h_GNUSTEP_GUI_INCLUDE
|
#define _NSPICTImageRep_h_GNUSTEP_GUI_INCLUDE
|
||||||
|
|
||||||
#include <AppKit/NSImageRep.h>
|
#include <AppKit/NSImageRep.h>
|
||||||
|
#include <Foundation/NSGeometry.h>
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
|
||||||
|
|
||||||
|
@ -33,8 +34,23 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@class NSData;
|
||||||
|
|
||||||
@interface NSPICTImageRep : NSImageRep
|
@interface NSPICTImageRep : NSImageRep
|
||||||
|
{
|
||||||
|
NSData *_imageData;
|
||||||
|
NSData *_pictRepresentation;
|
||||||
|
NSRect _boundingBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (instancetype) imageRepWithData: (NSData *)imageData;
|
||||||
|
|
||||||
|
- (instancetype) initWithData: (NSData *)imageData;
|
||||||
|
|
||||||
|
- (NSRect) boundingBox;
|
||||||
|
|
||||||
|
- (NSData *) PICTRepresentation;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
|
|
@ -26,5 +26,30 @@
|
||||||
|
|
||||||
@implementation NSPICTImageRep
|
@implementation NSPICTImageRep
|
||||||
|
|
||||||
|
+ (instancetype) imageRepWithData: (NSData *)imageData
|
||||||
|
{
|
||||||
|
return AUTORELEASE([[self alloc] initWithData: imageData]);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype) initWithData: (NSData *)imageData
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self != nil)
|
||||||
|
{
|
||||||
|
ASSIGNCOPY(_imageData, imageData);
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSRect) boundingBox
|
||||||
|
{
|
||||||
|
return _boundingBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSData *) PICTRepresentation
|
||||||
|
{
|
||||||
|
return [_pictRepresentation copy];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue