mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Fxi flipping in xlib. New background color method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@14492 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fb35644e9c
commit
c959aec53c
5 changed files with 39 additions and 9 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2002-09-19 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/win32/WIN32Server.m ([WIN -setbackgroundcolor::]): New.
|
||||
* Source/x11/XGServerWindow.m ([XGServer -_createBuffer:]): Remove
|
||||
setting background pixmap.
|
||||
([XGServer -setbackgroundcolor::]): New
|
||||
|
||||
* Source/xlib/XGGState.m
|
||||
(-_compositeGState:sourcefromRect:fromRecttoPoint:toPointop:opfraction):
|
||||
Convert destination point not rect.
|
||||
(-DPSimage:matrix:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:bitsPerPixel:bytesPerRow:isPlanar:hasAlpha:colorSpaceName:data):
|
||||
Remove flipping.
|
||||
|
||||
2002-09-19 00:33 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Header/x11/XGInputServer.h, Source/x11/XIMInputServer.m: Track
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# If you are interested in a warranty or support for this source code,
|
||||
# contact Scott Christley at scottc@net-community.com
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; see the file COPYING.LIB.
|
||||
# If not, write to the Free Software Foundation,
|
||||
|
|
|
@ -315,6 +315,10 @@ DWORD windowStyleForGSStyle(int style)
|
|||
//NSLog(@"Resulted in %d ", GetWindowLong((HWND)winNum, GWL_STYLE));
|
||||
}
|
||||
|
||||
- (void) setbackgroundcolor: (NSColor *)color : (int)win
|
||||
{
|
||||
}
|
||||
|
||||
/** Changes window's the backing store to type */
|
||||
- (void) windowbacking: (NSBackingStoreType)type : (int) winNum
|
||||
{
|
||||
|
|
|
@ -892,9 +892,6 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
|
|||
0, 0,
|
||||
NSWidth(window->xframe),
|
||||
NSHeight(window->xframe));
|
||||
|
||||
/* Set background pixmap to avoid redundant fills */
|
||||
XSetWindowBackgroundPixmap(dpy, window->ident, window->buffer);
|
||||
}
|
||||
|
||||
- (int) window: (NSRect)frame : (NSBackingStoreType)type : (unsigned int)style
|
||||
|
@ -1224,6 +1221,26 @@ NSDebugLLog(@"Frame", @"X2O %d, %@, %@", win->number,
|
|||
}
|
||||
}
|
||||
|
||||
- (void) setbackgroundcolor: (NSColor *)color : (int)win
|
||||
{
|
||||
XColor xf;
|
||||
gswindow_device_t *window;
|
||||
|
||||
window = WINDOW_WITH_TAG(win);
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
|
||||
color = [color colorUsingColorSpaceName: NSDeviceRGBColorSpace];
|
||||
xf.red = 65535 * [color redComponent];
|
||||
xf.green = 65535 * [color greenComponent];
|
||||
xf.blue = 65535 * [color blueComponent];
|
||||
NSDebugLLog(@"XGTrace", @"setbackgroundcolor: %@ %d", color, win);
|
||||
xf = [self xColorFromColor: xf forScreen: window->screen];
|
||||
window->xwn_attrs.background_pixel = xf.pixel;
|
||||
XSetWindowBackground(dpy, window->ident, window->xwn_attrs.background_pixel);
|
||||
}
|
||||
|
||||
- (void) windowbacking: (NSBackingStoreType)type : (int) win
|
||||
{
|
||||
gswindow_device_t *window;
|
||||
|
|
|
@ -470,7 +470,8 @@ static Region emptyRegion;
|
|||
flushRect.size = fromRect.size;
|
||||
flushRect.origin = toPoint;
|
||||
|
||||
drect = XGViewRectToX(self, flushRect);
|
||||
flushRect.origin = [ctm pointInMatrixSpace: flushRect.origin];
|
||||
drect = XGWindowRectToX(self, flushRect);
|
||||
|
||||
toXPoint.x = drect.x;
|
||||
toXPoint.y = drect.y;
|
||||
|
@ -1703,8 +1704,6 @@ typedef enum {
|
|||
|
||||
|
||||
// --- Determine screen coverage --------------------------------------
|
||||
if (viewIsFlipped)
|
||||
rect.origin.y -= rect.size.height;
|
||||
sr = [self viewRectToX: rect];
|
||||
|
||||
// --- Determine region to draw --------------------------------------
|
||||
|
|
Loading…
Reference in a new issue