Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Sun Jun 08, 2003 6:28 pm Post subject: Background drawing, transparent colors, status redraw fix
I changed the background drawing away from the DrawRect() overload and introduced a new SalGraphics member function for explicitly drawing the background. This is called in the case of OutputDevice::Erase() for null wallpaper types, what dan changed the wallpapers to (essentially, a transparent wallpaper).
This seems more coherent to me since there are actually devices that will want to work with a transparent background, and it also cleans up the problem of not being able to convert the special transparent color for windows back into a SalColor for clients that request it (there is a problem with calling the component access routines for colors in a pattern namespace...causes ObjC runtime errors).
I cleaned up the setting of the initial colors for graphics devices to be black & white and used proper alpha transparency in the parameterless SetLineColor()/SetFillColor().
Also discovered that we can't draw the window background into virtual devices, only into views embeded in windows (kinda makes sense). As a results, we'll still have to use SetBackground(GetSystemWallpaper()) for any virtual devices whose contents are going to be blitted directly into a window as a user interface element. The status area is like this.
I also noticed that our font inversion problems seem to only be limited to virtual devices blitted into the VCLView with SalGraphics::CopyBits(). I suspect the dual inversion is happening because there is an initial inversion in the image from the CG context associated with the virtual device, and the second inversion of the contents is happening when we copy it into the destination view whose CG context also has a transform applied to it. I think if we invert the source image again during the blitting we should be able to fix up the upside-down font issues in sdraw's status area (reads cursor location) and in the rulers. Must cook dinner now so will investigate later
Checking in aqua/source/gdi/salgdi.cxx;
/cvs/vcl/aqua/source/gdi/salgdi.cxx,v <-- salgdi.cxx
new revision: 1.40; previous revision: 1.39
Checking in inc/salgdi.hxx;
/cvs/vcl/inc/salgdi.hxx,v <-- salgdi.hxx
new revision: 1.9; previous revision: 1.8
Checking in source/gdi/outdev6.cxx;
/cvs/vcl/source/gdi/outdev6.cxx,v <-- outdev6.cxx
new revision: 1.4; previous revision: 1.3
Checking in source/window/status.cxx;
/cvs/vcl/source/window/status.cxx,v <-- status.cxx
new revision: 1.7; previous revision: 1.6
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum