Direct2D Gauges

n4gix

Resource contributor
Okay, so it can be done. What you don't mention though is just what is gained?

What makes using this better than, different than, or superior to what can already be done? I'm sure I'm not the only one who is wondering... ;)
 

JB3DG

Resource contributor
Well for one thing it is WAAAY more efficient that GDI/GDI+ in almost every area since it works through the Direct3D interface...So if you are doing a lot of intensive vector drawing you would get much better performance with it.
 

n4gix

Resource contributor
Having read the "Direct2D API Overview" article:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd317121(v=vs.85).aspx

I note that there are some very interesting and unique functions available that are not (easily) implemented using GDI+ only, such as the various gradient brushes, and "Geometries."

In addition to basic drawing primitives such as points, rectangles, and ellipses, Direct2D provides the ID2D1Geometry interface for describing simple and complex shapes. Interfaces that inherit from ID2D1Geometry define different types of shapes, such as ID2D1RectangleGeometry for representing rectangles, ID2D1RoundedRectangleGeometry for representing rounded rectangles, and ID2D1EllipseGeometry for representing ellipses.

More complex shapes can be created by using the ID2D1GeometrySink interface to specify a series of figures composed of lines, curves, and arcs. The ID2D1GeometrySink is passed to the Open method of an ID2D1PathGeometry to generate a complex geometry. ID2D1SimplifiedGeometrySink can also be used with the DirectWrite API to extract path outlines of formatted text for artistic rendering.
These are the sorts of advantages I was really asking about. :cool:
 

JB3DG

Resource contributor
The only snag i have is that i cant find anything for controlling pixels directly...(like for ground/weather map drawing). Also cant find anything for changing the alpha channel of a bitmap...
 
Top