Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This enumeration contains values used in IViewObject::Drawto specify new drawing aspects used to optimize the drawing process.
Syntax
typedef enum tagDVASPECT2 { DVASPECT_OPAQUE = 16, DVASPECT_TRANSPARENT = 32 } DVASPECT2; |
Elements
- DVASPECT_OPAQUE
-
Represents the opaque, easy-to-clip parts of an object. Objects may or may not support this aspect.
- DVASPECT_TRANSPARENT
-
Represents the transparent or irregular parts of on object, typically parts that are expensive or impossible to clip out. Objects may or may not support this aspect.
Remarks
To support drawing optimizations to reduce flicker, an object needs to be able to draw and return the following information about three separate aspects of itself:
- DVASPECT_CONTENT
-
Same as before. Specifies the entire content of an object. All objects should support this aspect.
- DVASPECT_OPAQUE
-
Represents the opaque, easy-to-clip parts of an object. Objects may or may not support this aspect.
- DVASPECT_TRANSPARENT
-
Represents the transparent or irregular parts of on object, typically parts that are expensive or impossible to clip out. Objects may or may not support this aspect.
The container can determine which of these drawing aspects an object supports by calling the new method IViewObjectEx::GetViewStatus. Individual bits return information about which aspects are supported.
If an object does not support the IViewObjectExinterface, it is assumed to support only DVASPECT_CONTENT.
Depending on which aspects are supported, the container can ask the object to draw itself during the front-to-back pass only, the back-to-front pass only, or both. The following cases are possible:
- Objects supporting only DVASPECT_CONTENT should be drawn during
the back-to-front pass, with all opaque parts of any overlapping
object clipped out.
Because all objects should support this aspect, a container not concerned about flickering — maybe because it is drawing in an off-screen bitmap — can opt to draw all objects that way and skip the front-to-back pass. - Objects supporting DVASPECT_OPAQUE may be asked to draw this
aspect during the front-to-back pass. The container is responsible
for clipping out the object's opaque regions returned by
IViewObjectEx::GetRegionbefore painting any further object
behind it.
- Objects supporting DVASPECT_TRANSPARENT may be asked to draw
this aspect during the back-to-front pass. The container is
responsible for clipping out opaque parts of overlapping objects
before letting an object draw this aspect.
Even when DVASPECT_OPAQUE and DVASPECT_TRANSPARENT are supported, the container is free to use these aspects or not. In particular, if it is painting in an off-screen bitmap and consequently is unconcerned about flicker, the container can use DVASPECT_CONTENT and a one-pass drawing only.
However, in a two-pass drawing, if the container uses DVASPECT_OPAQUE during the front-to-back pass, it must use DVASPECT_TRANSPARENT during the back-to-front pass to complete the rendering of the object.
Requirements
Header | ocidl.h |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |