Graphics
This section covers Creo Object TOOLKIT C++ graphics including displaying lists, displaying text, using the mouse and object displays.
Overview
The methods described in this section allow you to draw temporary graphics in a display window. Methods that are identified as 2D are used to draw entities (arcs, polygons, and text) in screen coordinates. Other entities may be drawn using the current model’s coordinate system or the screen coordinate system’s lines, circles, and polylines. Methods are also included for manipulating text properties and accessing mouse inputs.
Getting Mouse Input
The following methods are used to read the mouse position in screen coordinates with the mouse button depressed. Each method outputs the position and an enumerated type description of which mouse button was pressed when the mouse was at that position. These values are contained in the interface pfcMouseStatus. The enumerated values are defined in pfcMouseButton.
Methods Introduced:
The method pfcSession::UIGetNextMousePick returns the mouse position when you press a mouse button. The input argument is the mouse button that you expect the user to select.
The method pfcSession::UIGetCurrentMouseStatus returns a value whenever the mouse is moved or a button is pressed. With this method a button does not have to be pressed for a value to be returned. You can use an input argument to flag whether or not the returned positions are snapped to the window grid.
Drawing a Mouse Box
This method allows you to draw a mouse box.
Method Introduced:
The method pfcSession::UIPickMouseBox draws a dynamic rectangle from a specified point in screen coordinates to the current mouse position until the user presses the left mouse button. The return value for this method is of the type pfcOutline3D.
You can supply the first corner location programmatically or you can allow the user to select both corners of the box.
Cosmetic Properties
You can enhance your model using Creo Object TOOLKIT C++ methods that change the surface properties, or set different light sources. The following section describes these methods in detail.
Surface Properties
Methods Introduced:
  • wfcWSelection::GetVisibleAppearance
  • wfcWSelection::SetVisibleAppearance
  • wfcAppearance::Create
  • wfcAppearance::GetAmbient
  • wfcAppearance::SetAmbient
  • wfcAppearance::GetDescription
  • wfcAppearance::SetDescription
  • wfcAppearance::GetDiffuse
  • wfcAppearance::SetDiffuse
  • wfcAppearance::GetHighlight
  • wfcAppearance::SetHighlight
  • wfcAppearance::GetHighlightColor
  • wfcAppearance::SetHighlightColor
  • wfcAppearance::GetKeywords
  • wfcAppearance::SetKeywords
  • wfcAppearance::GetLabel
  • wfcAppearance::SetLabel
  • wfcAppearance::GetName
  • wfcAppearance::SetName
  • wfcAppearance::GetRGBColor
  • wfcAppearance::SetRGBColor
  • wfcAppearance::GetReflection
  • wfcAppearance::SetReflection
  • wfcAppearance::GetShininess
  • wfcAppearance::SetShininess
  • wfcAppearance::GetTransparency
  • wfcAppearance::SetTransparency
  • wfcWSurface::GetNextSurface
  • wfcWSelection::SetVisibleTextures
  • wfcWSelection::GetVisibleTextures
  • wfcTexture::Create
  • wfcTexture::GetType
  • wfcTexture::SetType
  • wfcTexture::GetFilePath
  • wfcTexture::SetFilePath
  • wfcTexture::GetPlacement
  • wfcTexture::SetPlacement
  • wfcTexturePlacement::Create
  • wfcTexturePlacement::GetTextureProjectionType
  • wfcTexturePlacement::SetTextureProjectionType
  • wfcTexturePlacement::GetLocalSys
  • wfcTexturePlacement::SetLocalSys
  • wfcTexturePlacement::GetHorizontalOffset
  • wfcTexturePlacement::SetHorizontalOffset
  • wfcTexturePlacement::GetVerticalOffset
  • wfcTexturePlacement::SetVerticalOffset
  • wfcTexturePlacement::GetRotate
  • wfcTexturePlacement::SetRotate
  • wfcTexturePlacement::GetHorizontalScale
  • wfcTexturePlacement::SetHorizontalScale
  • wfcTexturePlacement::GetVerticalScale
  • wfcTexturePlacement::SetVerticalScale
  • wfcTexturePlacement::GetBumpHeight
  • wfcTexturePlacement::SetBumpHeight
  • wfcTexturePlacement::GetDecalIntensity
  • wfcTexturePlacement::SetDecalIntensity
  • wfcTexturePlacement::GetHorizontalFlip
  • wfcTexturePlacement::SetHorizontalFlip
  • wfcTexturePlacement::GetVerticalFlip
  • wfcTexturePlacement::SetVerticalFlip
  • wfcWSession::IsTextureFileEmbedded
  • wfcWSession::GetTextureFilePath
  • The methods wfcWSelection::GetVisibleAppearance and wfcWSelection::SetVisibleAppearance enable you to retrieve and set the appearance properties for the specified model using an object of the class wfcAppearance.
    Note
    To set the default surface appearance properties, pass the value NULL to the AppearanceProps parameter of the wfcWSelection::SetVisibleAppearance method.
    The class wfcAppearance is an interface to the appearance properties and contains the methods described below.
    Use the method wfcAppearance::Create to create an instance of the wfcAppearance object.
    •  Ambient—Specifies the indirect, scattered light the model receives from its surroundings. The valid range is from 0.0 to 1.0.
    •  Description—Specifies the model description.
    •  Diffuse—Specifies the reflected light that comes from directional, point, or spot lights. The valid range is from 0.0 to 1.0.
    •  Highlight—Specifies the intensity of the light reflected from a highlighted surface area. The valid range is from 0.0 to 1.0.
    •  HighlightColor—Specifies the highlight color, in terms of red, green, and blue. The valid range is from 0.0 to 1.0.
    •  Keywords—Specifies the keywords in the specified model.
    •  Label—Specifies the labels in the model.
    •  Name— Specifies the name of the model.
    •  RGBColor— Specifies the color, in the RGB format. The valid range is from 0.0. to 1.0.
    •  Reflection—Specifies how reflective the surface is. The valid range is from 0, that is dull to 100, that is shiny.
    •  Shininess—Specifies the properties of a highlighted surface area. A plastic model would have a lower shininess value, while a metallic model would have a higher value. The valid range is from 0.0. to 1.0.
    •  Transparency— Specifies the transparency value, which is between 0 that is completely opaque to 1.0 that is completely transparent.
    Use the methods wfcAppearance::GetAmbient and wfcAppearance::SetAmbient to get and set the ambience value.
    Use the methods wfcAppearance::GetDescription and wfcAppearance::SetDescription to get and set the description for the specified model.
    Use the methods wfcAppearance::GetDiffuse and wfcAppearance::SetDiffuse to get and set the value for the diffused light.
    Use the methods wfcAppearance::GetHighlight and wfcAppearance::SetHighlight to get and set the intensity of the highlighted light.
    Use the methods wfcAppearance::GetHighlightColor and wfcAppearance::SetHighlightColor to get and set the highlight color.
    Use the methods wfcAppearance::GetKeywords and wfcAppearance::SetKeywords to get and set the keywords.
    Use the methods wfcAppearance::GetLabel and wfcAppearance::SetLabel to get and set labels in the specified model.
    Use the methods wfcAppearance::GetName and wfcAppearance::SetName to get and set the model name for the specified model.
    Use the methods wfcAppearance::GetRGBColor and wfcAppearance::SetRGBColor to get and set the RGBColor.
    Use the methods wfcAppearance::GetReflection and wfcAppearance::SetReflection to get and set the reflectivity of the surface.
    Use the methods wfcAppearance::GetShininess and wfcAppearance::SetShininess to get and set the properties of a highlighted surface area.
    Use the methods wfcAppearance::GetTransparency and wfcAppearance::SetTransparency to get and set the transparency value.
    Use the methods wfcWSelection::GetVisibleTextures and wfcWSelection::SetVisibleTextures to get and set the properties related to the surface texture respectively using an object of the class wfcTexture. The class wfcTexture is an interface to the texture property and contains the methods described below.
    Use the method wfcTexture::Create to create an instance of the wfcTexture object. The parameters of this method are given below:
    •  Type—Specifies the type of the texture.
    •  FilePath—Specifies the full path to the texture.
    •  Placement—Specifies the properties related to the placement of surface texture.
    Use the methods wfcTexture::GetType and wfcTexture::SetType to get and set the type of the texture using the enumerated type wfcTextureType.The valid values of the enumerated type wfcTextureType are as follows:
    •  NULL_TEXTURE—Specifies that no texture map is assigned.
    •  BUMP_TEXTURE—Specifies the single-channel texture maps that represent height fields. This texture results in shaded surface and has a wrinkled or irregular appearance.
    •  COLOR_TEXTURE—Specifies the surface color such as woodgrain, geometric patterns, and pictures applied to the texture.
    •  DECAL_TEXTURE—Specifies the specialized texture maps such as company logos or text that are applied to a surface. A decal is a texture with an alpha or transparency mask.
    Use the methods wfcTexture::GetFilePath and wfcTexture::SetFilePath to get and set the full path to the texture map.
    Use the methods wfcTexture::GetPlacement and wfcTexture::SetPlacement to get and set the sequence of placements properties using an object of the class wfcTexturePlacement. The parameters of the class wfcTexturePlacement are as follows:
    Use the method wfcTexturePlacement::Create to create an instance of the object wfcTexturePlacement. The parameters of this method are as follows:
    •  TextureProjectionType—Specifies the projection type of the texture on the selected surface or surfaces.
    •  LineEnvelope—Specifies the coordinate system that defines the direction for the planar projection, or the center for the other projection types.
    •  HorizontalOffset—Specifies the percentage of horizontal shift of the texture map on the surface.
    •  VerticalOffset—Specifies the percentage of vertical shift of the texture map on the surface.
    •  Rotate—Specifies the angle to rotate the texture map on the surface.
    •  HorizontalScale—Specifies the horizontal scaling of the texture map.
    •  VerticalScale—Specifies the vertical scaling of the texture map.
    •  BumpHeight—Specifies the height of the bump on the surface of the texture map.
    •  DecalIntensity—Specifies the alpha or transparency mask intensity on the surface.
    •  HorizontalFlip—Specifies that the texture map on the surface should be flipped horizontally.
    •  VerticalFlip—Specifies that the texture map on the surface should be flipped vertically.
    Use the methods wfcTexturePlacement::GetTextureProjectionType and wfcTexturePlacement::SetTextureProjectionType to get and set the texture projection type using the enumerated type wfcTextureProjectionType.
    Use the methods wfcTexturePlacement::GetLocalSys and wfcTexturePlacement::SetLocalSys to get and set the line envelope.
    Use the methods wfcTexturePlacement::GetHorizontalOffset and wfcTexturePlacement::SetHorizontalOffset to get and set the horizontal offset.
    Use the methods wfcTexturePlacement::GetVerticalOffset and wfcTexturePlacement::SetVerticalOffset to get and set the vertical offset.
    Use the methods wfcTexturePlacement::GetRotate and wfcTexturePlacement::SetRotate to get and set the rotating angle.
    Use the methods wfcTexturePlacement::GetHorizontalScale and wfcTexturePlacement::SetHorizontalScale to get and set the horizontal scale.
    Use the methods wfcTexturePlacement::GetVerticalScale and wfcTexturePlacement::SetVerticalScale to get and set the vertical scale.
    Use the methods wfcTexturePlacement::GetBumpHeight and wfcTexturePlacement::SetBumpHeight to get and set the height of the bump.
    Use the methods wfcTexturePlacement::GetDecalIntensity and wfcTexturePlacement::SetDecalIntensity to get and set the decal intensity.
    Use the methods wfcTexturePlacement::GetHorizontalFlip and wfcTexturePlacement::SetHorizontalFlip to get and set the horizontal flip.
    Use the methods wfcTexturePlacement::GetVerticalFlip and wfcTexturePlacement::SetVerticalFlip to get and set the vertical flip.
    The method wfcWSession::IsTextureFileEmbedded checks if the specified texture, decal, or bump map file is embedded in the model.
    The method wfcWSession::GetTextureFilePath returns the full path of the specified texture, decal, or bump map file and loads the file from the path. If you specify the input argument CreateTempFile as true, the method creates a temporary copy of the texture file.
    Item Properties
    Methods Introduced:
    The method wfcItemAppearanceAndTextures::GetAppearance retrieves the appearance properties for the specified item using the wfcAppearance object.
    The method wfcItemAppearanceAndTextures::GetTextures retrieves the texture properties for the specified item using the wfcTextures object.
    Use the method wfcItemAppearanceAndTextures::GetSelection to retrieve the selection handle of the item using the pfcSelection object.
    For more information, see Surface Properties.
    Setting Light Sources
    The methods in this section allow you to set the light sources to render a model in the specified graphics window.
    Methods Introduced:
    The method wfcWWindow::GetLightInstructions retrieves the information about the light sources in the specified Creo window. Use the method wfcWWindow::SetLightInstructions to set the parameters for a light source in the specified window.
    Use the method wfcLightSourceInstruction::Create to create an instance of the object wfcLightSourceInstruction that contains all the information related to light sources. The parameters of this method are as follows:
    •  inName—Specifies the name of the light source.
    •  inType—Specifies the type of light using the enumerated data type wfcLightType. The light types are —ambient, direction, point, spot, or HDRI.
    •  inColor—Specifies the color of the light in red, green, and blue values.
    •  inIsActive—Specifies if the light source is active.
    Use the methods wfcLightSourceInstruction::GetName and wfcLightSourceInstruction::SetName to get and set the name of the light source.
    Use the methods wfcLightSourceInstruction::GetType and wfcLightSourceInstruction::SetType to get and set the type of light source using the enumerated data type wfcLightType. The light types are:
    •  wfcLIGHT_AMBIENT—Ambient light illuminates all the surfaces equally. The position of the light in the room has no effect on the rendering. Ambient light exists by default and cannot be created or set in Creo application.
    •  wfcLIGHT_DIRECTION—Directional light casts parallel light rays illuminating all surfaces at the same angle, regardless of the position of the model.
    •  wfcLIGHT_POINT—Point light is similar to the light from a bulb in a room where the light radiates from the center. The light reflected off a surface varies, depending on the surface position with respect to the light.
    •  wfcLIGHT_SPOT—Spotlight is similar to a light bulb but with its rays confined within a cone called the spot angle.
    •  wfcLIGHT_HDRI—High Dynamic Range Image (HDRI) is used to illuminate the model. The light type cannot be set in Creo application.
    Use the methods wfcLightSourceInstruction::GetColor and wfcLightSourceInstruction::SetColor to get and set the color of light as red, green, and blue values.
    The method wfcLightSourceInstruction::GetIsActive checks if the light source is active. Use the method wfcLightSourceInstruction::SetIsActive to set the light source as active.
    Use the methods wfcLightSourceInstruction::GetPosition and wfcLightSourceInstruction::SetPosition to get and set the position of the light source. Specify the position only for point and spot lights.
    Use the methods wfcLightSourceInstruction::GetDirection and wfcLightSourceInstruction::SetDirection to get and set the direction of the light source. Specify the direction only for direction and spot lights.
    Use the methods wfcLightSourceInstruction::GetSpreadAngle and wfcLightSourceInstruction::SetSpreadAngle to get and set the angle to which the light is spread in radians. Specify the spread angle only for spot light.
    Use the method wfcLightSourceInstruction::GetCastShadows to identify if the light source casts a shadow. The wfcLightSourceInstruction::SetCastShadows sets the light source to cast a shadow. Shadows can be applied only in Creo Render Studio. Refer to the Creo Render Studio Help for more information.
    Example 1: Adding a Light Source
    The sample code in OTKXLights.cxx located at <creo_otk_loadpoint_app>/otk_examples/otk_examples_graphics shows how to add a light source using the Creo Object TOOLKIT C++ methods. It also shows how to extract and display information for a light source.
    Graphics Colors
    Creo application uses several predefined colors in its color map which correspond to the system colors presented to the user through the user interface. The names of the types generally indicate what they are used for in the Creo application.
    Note
    PTC reserves the right to change both the definitions of the predefined colormap and also of the assignment of entities to members of the color map as required by improvements to the user interface. PTC recommends not relying on the predefined RGB color for displaying of Creo Object TOOLKIT C++ entities or graphics, and also recommends against relying on the relationship between certain colormap entries and types of entities. The following sections describe how to construct your application so that it does not rely on potentially variant properties in Creo application.
    Setting Colors to Match Existing Entities
    Method Introduced:
    The method wfcWDisplay::GetColorByObjectType returns the standard color used to display the specified entity in the Creo application.
    The association between objects and colormap entries may change in a new release of Creo. This causes the association between the application entities and the Creo entities to be lost. You can use this method to get the display color of the entity.
    Version of Color Map
    Methods Introduced:
    The method wfcWDisplay::GetColorRGBVersion returns the version of the Creo color map. Use the method wfcWDisplay::SetColorRGBVersion to set the version of the color map using the enumerated data type wfcColorRGBVersion. To specify a color map from releases prior to the Pro/ENGINEER Wildfire release specify the value as:
    •  wfcCOLORRGB_STANDARD_VERSION—Specifies the appearance.dmt files for the color map.
    •  wfcCOLORRGB_PRE_WILDFIRE_VERSION—Specifies the color.map files for the color map from releases prior to the Pro/ENGINEER Wildfire release.
    Color Schemes
    Methods Introduced:
    The method wfcWDisplay::SetColorRGBAlternateScheme allow you to change the color scheme of Creo application to a predefined alternate color scheme. The alternate color scheme defined in the enumerated data type wfcColorRGBAlternateScheme has the following valid values:
    •  wfcCOLORRGB_ALT_DEFAULT—Resets the color scheme to the default color scheme of light to dark blue gradient background.
    •  wfcCOLORRGB_ALT_BLACK_ON_WHITE—Displays black entities on a white background.
    •  wfcCOLORRGB_ALT_WHITE_ON_BLACK—Displays white entities on a black background.
    •  wfcCOLORRGB_ALT_WHITE_ON_GREEN—Displays white entities on a dark green background.
    •  wfcCOLORRGB_OPTIONAL1—Represents the color scheme with a dark background.
    •  wfcCOLORRGB_OPTIONAL2—Represents the color scheme with a medium background.
    •  wfcCOLORRGB_CLASSIC_WF—Resets the color scheme to the light to dark grey background. This was the default color scheme till Pro/ENGINEER Wildfire 4.0.
    Use the method wfcWDisplay::GetColorRGBAlternateScheme to get the current alternate color scheme.
    Line Styles for Graphics
    Methods Introduced:
    The method wfcWSession::GetLineStyleData returns information about the specified line style as a wfcLineStyleData object.
    The method wfcLineStyleData::GetName returns the name of the specified line style.
    The method wfcLineStyleData::GetDefinition returns the definition of the line style as a series of dashes (-) and spaces ( ).
    The method wfcLineStyleData::GetCapStyle returns the cap style used for line ends. The method wfcLineStyleData::GetJoinStyle returns the style in which line ends are joined. The cap style and join line settings are used from the pen table file for printing a drawing file as a PDF document.
    The method wfcLineStyleData::GetDashOffset returns the distance between the two dashes in the pattern.
    The method wfcLineStyleData::GetDashList returns a list of dashes defined in the specified line style.
    The method wfcLineStyleData::GetFillStyle returns the name of the line font for the specified line style.
    The method wfcLineStyleData::GetFillRule returns the rule defined to fill a unit of length with the line style pattern.
    Displaying Graphics
    All the methods in this section draw graphics in the Creo current window and use the color and linestyle set by calls to pfcBaseSession::SetStdColorFromRGB and pfcBaseSession::SetLineStyle. The methods draw the graphics in the Creo graphics color. The default graphics color is white.
    The methods in this section are called using the interface pfcDisplay. This interface is extended by the pfcBaseSession interface. This architecture allows you to call all these methods on any pfcSession object.
    By default graphic elements are not stored in the Creo display list. Thus, they do not get redrawn by Creo when the user uses repaint and orientation commands. However, if you store graphic elements in either 2-D or 3-D display lists, Creo application will redraw them when appropriate. See the section on Display Lists and Graphics for more information.
    Methods Introduced:
    The method pfcDisplay::SetPenPosition sets the point at which you want to start drawing a line. The method pfcDisplay::DrawLine draws a line to the given point from the position given in the last call to either of the two methods. Call pfcDisplay::SetPenPosition for the start of the polyline, and pfcDisplay::DrawLine for each vertex. If you use these methods in two-dimensional modes, use screen coordinates instead of solid coordinates.
    The method pfcDisplay::DrawCircle uses solid coordinates for the center of the circle and the radius value. The circle will be placed to the XY plane of the model.
    The method pfcDisplay::DrawPolyline also draws polylines, using an array to define the polyline.
    Use the method wfcWDisplay::DrawPolylines to draw multiple polylines. Pass the sequence of polylines as a wfcPolylines object as the input argument.
    In two-dimensional models the Display Graphics methods draw graphics at the specified screen coordinates.
    The method pfcDisplay::DrawPolygon2D draws a polygon in screen coordinates. The method pfcDisplay::DrawArc2D draws an arc in screen coordinates.
    Controlling Graphics Display
    Methods Introduced:
    The method pfcDisplay::GetCurrentGraphicsColor returns the standard color used to display graphics in the Creo application. TheCreo default is pfcCOLOR_DRAWING (white). The method pfcDisplay::SetCurrentGraphicsColor allows you to change the color used to draw subsequent graphics.
    The method pfcDisplay::GetCurrentGraphicsMode returns the mode used to draw graphics:
    •  pfcDRAW_GRAPHICS_NORMALCreo application draws graphics in the required color in each invocation.
    •  pfcDRAW_GRAPHICS_COMPLEMENTCreo application draws graphics normally, but will erase graphics drawn a second time in the same location. This allows you to create rubber band lines.
    The method pfcDisplay::GetCurrentGraphicsMode allows you to set the current graphics mode.
    Displaying Text in the Graphics Window
    Method Introduced:
    The method pfcDisplay::DrawText2D places text at a position specified in screen coordinates. If you want to add text to a particular position on the solid, you must transform the solid coordinates into screen coordinates by using the view matrix.
    Text items drawn are not known to Creo and therefore are not redrawn when you select the repaint command. To notify the Creo application of these objects, create them inside the OnDisplay() method of the Display Listener.
    Controlling Text Attributes
    Methods Introduced:
    These methods control the attributes of text added by calls to pfcDisplay::DrawText2D.
    You can get and set the following information:
    •  Text height (in screen coordinates)
    •  Width ratio of each character, including the gap, as a proportion of the height
    •  Rotation angle of the whole text, in counterclockwise degrees
    •  Slant angle of the text, in clockwise degrees
    Controlling Text Fonts
    Methods Introduced:
    The method pfcDisplay::GetDefaultFont returns the default Creo text font. The text fonts are identified in Creo application by names and by integer identifiers. To find a specific font, use the methods pfcDisplay::GetFontById or pfcDisplay::GetFontByName.
    Display Lists and Graphics
    When generating a display of a solid in a window,Creo application maintains two display lists. A display list contains a set of vectors that are used to represent the shape of the solid in the view. A 3D display list contains a set of three-dimensional vectors that represent an approximation to the geometry of the edges of the solid. This list gets rebuilt every time the solid is regenerated.
    A 2D display list contains the two-dimensional projections of the edges of the solid 3D display list onto the current window. It is rebuilt from the 3D display list when the orientation of the solid changes. The methods in this section enable you to add your own vectors to the display lists, so that the graphics will be redisplayed automatically by Creo application until the display lists are rebuilt.
    When you add graphics items to the 2D display list, they will be regenerated after each repaint (when zooming and panning) and will be included in plots created by Creo. When you add graphics to the 3D display list, you get the further benefit that the graphics survive a change to the orientation of the solid and are displayed even when you spin the solid dynamically.
    Methods Introduced:
    A display listener is a class that acts similarly to an action listener. You must implement the method inherited from the pfcDisplayListener interface. The implementation should provide calls to methods on the provided pfcDisplay object to produce 2D or 3D graphics.
    In order to create a display list in Creo application, you must call pfcDisplay::CreateDisplayList2D or pfcDisplay::CreateDisplayList3D to tell Creo application to use your listener to create the display list vectors.
    pfcDisplayList2D::Display or pfcDisplay::List3D.Display will display or redisplay the elements in your display list. The application should delete the display list data when it is no longer needed.
    The methods pfcDisplayList2D::Delete and the method pfcDisplayList3D::Delete will remove both the specified display list from a session.
    Note
    The method pfcWindow::Refresh does not cause either of the display lists to be regenerated, but simply repaints the window using the 2D display list.
    Exceptions
    Possible exceptions that might be thrown by displaying graphics methods are shown in the following table:
    Exception
    Reason
    XToolkitNotExist
    The display list is empty.
    XToolkitNotFound
    The method could not find the display list or the font specified in a previous call to pfcDisplay::SetCurrentFont was not found.
    XToolkitCantOpen
    The use of display lists is disabled.
    XToolkitAbort
    The display was aborted.
    XToolkitNotValid
    The specified display list is invalid.
    XToolkitInvalidItem
    There is an invalid item in the display list.
    XToolkitGeneralError
    The specified display list is already in the process of being displayed.