> On Jun 11, 2015, at 11:42 AM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote: > > On 2015-06-10 21:44-0400 Jim Dishaw wrote: > >> [...]The driver does not support alpha blending or native gradient fills. > I’m not sure if it is worthwhile to add these features in this driver, > particular with a Direct2D version on the horizon. > > To Jim and Aaron: > > I didn't completely understand what Jim said above at first, and that > motivated me to look up (via google searches) what Windows subsystems > supported the important alpha blending and native (linear) gradient > capabilities. It appears from what I skimmed that both GDI+ and > Direct2D support those capabilities which is also consistent with what > Jim said above. > > @Jim: could you please confirm I now have the correct overview?
The GDI API only supports a limited gradient fill capability. Essentially it can do gradients with a vertical or horizontal orientation. GDI+ supports horizontal, vertical, and diagonal gradient fills. It can also do a “path gradient,” which is a closed shape with a gradient that changes from an interior point to the edges. GDI has the ability to alpha blend a bitmap. Thus, to implement alpha blending in GDI, the driver would need to draw to a bitmap, apply the alpha blending (possibly sectioning the bitmap if the alpha value is not constant over the bitmap), and blit the bitmap(s) to the window. Not a difficult change, but how important is it to add? GDI+ and direct2d has alpha blending brushes and the ability to specify alpha value in colors. > > If that overview is correct, I am hoping we will end up with a driver > that supports alpha blending and native gradient via the > GDI/GDI+/Direct2D API's (only available for newer Windows platforms) > and possibly (if Aaron decides to work on it) also for the > GDI/GDI+/Uniscribe API's (available for a wider range of Windows > platforms than GDI/GDI+/Direct2D). In the former case it does make > sense to go with Direct2D support of alpha blending and gradient fills > if there are some advantages to that API over the corresponding GDI+ > API. Of course, if/when the GDI/GDI+/Uniscribe approach is > implemented, it will need to use the GDI+ API to support alpha > blending and native gradients for the driver, but I am fine with that > from the overview perspective. From what I can tell, Direct2D is much faster than GDI+ and easier to work with. It sounds like there will be three drivers wingdi: GDI only (and possibly an alpha blending capability) with ASCII and UNICODE (if available) text rendering wingdi+: GDI+ (includes alpha blending, maybe native gradients) with UNICODE text rendering wind2d: Direct2D (includes alpha blending, native gradients) with UNICODE text rendering Fortunately, I think the three drivers will be able to share some code. ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel