Fixed clipping in OS X Quartz offscreen buffers (STR #1595)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
b5d637a4cd
commit
474fa58939
2
CHANGES
2
CHANGES
@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.8
|
||||
|
||||
- Documentation fixes (STR #1454, STR #1455, STR #1456,
|
||||
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578)
|
||||
- Fixed clipping in OS X Quartz offscreen buffers
|
||||
(STR 1595)
|
||||
- Added Fl::set_awake_cb() to set a handler for thread
|
||||
messages (STR #1536)
|
||||
- Added "mute sound" option to Sudoku game.
|
||||
|
@ -483,7 +483,7 @@ void fl_restore_clip() {
|
||||
}
|
||||
# endif
|
||||
#elif defined(__APPLE_QUARTZ__)
|
||||
if ( fl_window )
|
||||
if ( fl_window ) // clipping for a true window
|
||||
{
|
||||
GrafPtr port = GetWindowPort( fl_window );
|
||||
if ( port ) {
|
||||
@ -497,6 +497,16 @@ void fl_restore_clip() {
|
||||
Fl_X::q_fill_context();
|
||||
DisposeRgn( portClip );
|
||||
}
|
||||
} else if (fl_gc) { // clipping for an offscreen drawing world (CGBitmap)
|
||||
Rect portRect;
|
||||
portRect.top = 0;
|
||||
portRect.left = 0;
|
||||
portRect.bottom = CGBitmapContextGetHeight(fl_gc);
|
||||
portRect.right = CGBitmapContextGetWidth(fl_gc);
|
||||
Fl_X::q_clear_clipping();
|
||||
if (r)
|
||||
ClipCGContextToRegion(fl_gc, &portRect, r);
|
||||
Fl_X::q_fill_context();
|
||||
}
|
||||
#else
|
||||
if (r) XSetRegion(fl_display, fl_gc, r);
|
||||
|
Loading…
Reference in New Issue
Block a user