mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:17:39 +00:00
Implement GSReadRect and initWithFocusedViewRect:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17687 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d81427181
commit
50ed66958a
7 changed files with 68 additions and 18 deletions
|
@ -652,8 +652,8 @@ NSGraphicsContext *GSCurrentContext(void)
|
|||
/* ----------------------------------------------------------------------- */
|
||||
/* NSGraphics Ops */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
methodTable.NSReadPixel_ =
|
||||
GET_IMP(@selector(NSReadPixel:));
|
||||
methodTable.GSReadRect_ =
|
||||
GET_IMP(@selector(GSReadRect:));
|
||||
|
||||
methodTable.NSBeep =
|
||||
GET_IMP(@selector(NSBeep));
|
||||
|
@ -1454,9 +1454,13 @@ NSGraphicsContext *GSCurrentContext(void)
|
|||
/* NSGraphics Ops */
|
||||
/* ----------------------------------------------------------------------- */
|
||||
@implementation NSGraphicsContext (NSGraphics)
|
||||
/** Read the Color at a Screen Position
|
||||
/** Read the data inside rect (defined in the current graphics state)
|
||||
and return the information as a bitmap. The dictionary contains
|
||||
the bitmap data plus various information about the size and format
|
||||
of the data. The dictionary keys include ImageSize, ImageBPS,
|
||||
ImageSPP, and ImageData.
|
||||
*/
|
||||
- (NSColor *) NSReadPixel: (NSPoint) location
|
||||
- (NSDictionary *) GSReadRect: (NSRect) rect
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue