Library | File

Class pfcDisplay

# include <pfcDisplay.h>

class pfcDisplay
 : public virtual pfcParent
{
    xaideclare(pfcDisplay)
    ...
};



Description

This interface represents the current session display. Because it is extended by pfcSession the methods and attributes can be accessed using that object. This interface contains methods to display graphics on the screen.


Direct Known Subclasses:
pfcBaseSession, wfcWDisplay



Method Summary

pfcDisplayList2D_ptrCreateDisplayList2D (xint Id, pfcScreenTransform_ptr Transform, pfcDisplayListener_ptr Action)
Creates a two-dimensional display list
pfcDisplayList3D_ptrCreateDisplayList3D (xint Id, pfcDisplayListener_ptr Action)
Creates a three-dimensional display list entity
voidDrawArc2D (pfcPoint3D_ptr Center, xreal Radius, pfcVector3D_ptr StartDirection, pfcVector3D_ptr EndDirection)
Draws an arc on the screen
voidDrawCircle (pfcPoint3D_ptr Center, xreal Radius)
Draws a circle on the screen
voidDrawLine (pfcPoint3D_ptr Endpoint)
Draws a line on the screen from the last pen position specified to the position specified by the Endpoint argument. The last pen position is specified using this same function previously times or by pfcDisplay::SetPenPosition(pfcPoint3D_ptr)
voidDrawPolygon2D (pfcPoint2Ds_ptr Vertices, optional pfcStdColor FillColor)
Draws two-dimensional polygon on the screen.
voidDrawPolyline (pfcPoint3Ds_ptr Points)
Draws a series of connected line segments on the screen.
voidDrawText2D (pfcPoint3D_ptr StartPoint, xrstring TextLine)
Draws text on the screen
pfcFont_ptrGetCurrentFont ()
voidSetCurrentFont (pfcFont_ptr value)
The current font used for text graphics in Creo Parametric.
pfcStdColorGetCurrentGraphicsColor ()
voidSetCurrentGraphicsColor (pfcStdColor value)
The standard color used to display new graphics.
pfcGraphicsModeGetCurrentGraphicsMode ()
voidSetCurrentGraphicsMode (pfcGraphicsMode value)
The mode used to display graphics (i.e. normal or complement).
pfcFont_ptrGetDefaultFont ()
The default font for this session of Creo Parametric.
optional pfcFont_ptrGetFontById (xint Id)
Creates a font object given a Creo Parametric font integer id.
optional pfcFont_ptrGetFontByName (xrstring Name)
Returns a font object given a Creo Parametric font name.
xrealGetRotationAngle ()
voidSetRotationAngle (xreal value)
The rotation angle of created text graphics (default is 0).
xrealGetSlantAngle ()
voidSetSlantAngle (xreal value)
The slant angle of created text graphics (default is 0).
xrealGetTextHeight ()
voidSetTextHeight (xreal value)
The text height of created text graphics.
xrealGetWidthFactor ()
voidSetWidthFactor (xreal value)
The width-to-height ratio for created text graphics.
voidInvalidate (pfcModel_ptr Model)
Invalidates the display list of the model singalling that a repaint is needed.
voidResetTextAttributes ()
Resets the Creo Parametric text attributes to use the default settings
voidSetPenPosition (pfcPoint3D_ptr NewPosition)
This method enables you to move to a point without producing any graphical output. This method is used when drawing lines using pfcDisplay::DrawLine(pfcPoint3D_ptr)


Methods Inherited from Class pfcParent:

GetChild



Method Detail

pfcDisplayList2D_ptrCreateDisplayList2D (xint Id, pfcScreenTransform_ptr Transform, pfcDisplayListener_ptr Action)

Creates a two-dimensional display list

Two dimensional display list operations in Creo Parametric are not currently supported. This method is reserved for future activation.
Manual References:
Graphics: Display Lists and Graphics, Graphics: Display Lists and Graphics
Parameters:
Id
 
Transform
The transformation matrix to be applied to the entities of the display list.
Action
The user-defined pfcDisplayListener that calls pfcDisplay methods to populate the display.
Returns:
The newly created DisplayList2D class instance



voidInvalidate (pfcModel_ptr Model)

Invalidates the display list of the model singalling that a repaint is needed.

Exceptions thrown (but not limited to):

pfcXToolkitInvalidType - The specified model is not a part, assembly, or drawing.

pfcXToolkitNotExist - The function cannot find the window associated with the object.


Parameters:
Model
The part, assembly or drawing
Returns:



voidDrawArc2D (pfcPoint3D_ptr Center, xreal Radius, pfcVector3D_ptr StartDirection, pfcVector3D_ptr EndDirection)

Draws an arc on the screen

All points are in logical screen cordinates
Manual References:
Graphics: Displaying Graphics, Graphics: Displaying Graphics
Parameters:
Center
The center point of the arc
Radius
The radius of the arc
StartDirection
Vector representing the start direction of the arc
EndDirection
Vector representing the end direction of the arc
Returns:



voidDrawPolygon2D (pfcPoint2Ds_ptr Vertices, optional pfcStdColor FillColor)

Draws two-dimensional polygon on the screen.

Exceptions thrown (but not limited to):

pfcXToolkitLineTooLong - You specified more than 100 points.


Manual References:
Graphics: Displaying Graphics
Parameters:
Vertices
A sequence of two dimensional points representing the polygon's vertices.
FillColor
The color of the polygon. If null, the polygon will be filled using the current graphics color.
Returns:



voidDrawText2D (pfcPoint3D_ptr StartPoint, xrstring TextLine)

Draws text on the screen

If no text attributes are set before this method call the program uses the default text attributes for Creo Parametric. Set the text attributes using the attributes on the pfcDisplay object.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The font specified in a previous call to ProtText*CurrentSet() was not found.


Manual References:
Graphics: Displaying Text in the Graphics Window, Graphics: Displaying Text in the Graphics Window
Parameters:
StartPoint
The starting point for text display, in logical screen coordinates
TextLine
The text to display
Returns:



pfcDisplayList3D_ptrCreateDisplayList3D (xint Id, pfcDisplayListener_ptr Action)

Creates a three-dimensional display list entity
Manual References:
Graphics: Display Lists and Graphics, Graphics: Display Lists and Graphics
Parameters:
Id
The identifier of the display list. This number must be unique.
Action
The user-defined pfcDisplayListener that calls pfcDisplay methods to create the display list.
Returns:
The newly-created DisplayList3D class instance



voidDrawCircle (pfcPoint3D_ptr Center, xreal Radius)

Draws a circle on the screen

Center point and orientation is in the coordinate system of the current object. For example, if the current object is a part, the point must be in the part's coordinate system. If the current object is an assembly, the point must be in the assembly's coordinate system. If the current object is a two dimensional model, circle will be normal to the screen.
Manual References:
Graphics: Displaying Graphics, Graphics: Displaying Graphics
Parameters:
Center
The center of the circle
Radius
The radius of the circle
Returns:



voidDrawLine (pfcPoint3D_ptr Endpoint)

Draws a line on the screen from the last pen position specified to the position specified by the Endpoint argument. The last pen position is specified using this same function previously times or by pfcDisplay::SetPenPosition(pfcPoint3D_ptr)

These points are in the coordinate system of the current object. For example, if the current object is a part, the points must be in the part's coordinate system. If the current object is an assembly, the points must be in the assembly's coordinate system.
Manual References:
Graphics: Displaying Graphics, Graphics: Displaying Graphics
Parameters:
Endpoint
 
Returns:



voidSetPenPosition (pfcPoint3D_ptr NewPosition)

This method enables you to move to a point without producing any graphical output. This method is used when drawing lines using pfcDisplay::DrawLine(pfcPoint3D_ptr)

This point is in the coordinate system of the current object. For example, if the current object is a part, the point must be in the part's coordinate system. If the current object is an assembly, the point must be in the assembly's coordinate system.
Manual References:
Graphics: Displaying Graphics, Graphics: Displaying Graphics
Parameters:
NewPosition
 
Returns:



voidDrawPolyline (pfcPoint3Ds_ptr Points)

Draws a series of connected line segments on the screen.

These points are in the coordinate system of the current object. For example, if the current object is a part, the points must be in the part's coordinate system. If the current object is an assembly, the points must be in the assembly's coordinate system. The total number of points should be less than 200.
Manual References:
Graphics: Displaying Graphics, Graphics: Displaying Graphics
Parameters:
Points
 
Returns:



pfcFont_ptrGetDefaultFont ()

The default font for this session of Creo Parametric.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function could not find a font name for the specified font identifier.


Manual References:
Graphics: Controlling Text Fonts, Graphics: Controlling Text Fonts




pfcFont_ptrGetCurrentFont ()
voidSetCurrentFont (pfcFont_ptr value)

The current font used for text graphics in Creo Parametric.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - This means either:

  • The attributes were not set, OR
  • The function could not find a font name for the specified font identifier.


Manual References:
Graphics: Controlling Text Fonts, Graphics: Controlling Text Fonts, Graphics: Exceptions




optional pfcFont_ptrGetFontById (xint Id)

Creates a font object given a Creo Parametric font integer id.

The correspondance between font names and integer identifiers stays constant for a given Creo Parametric session, but may be different for different sessions.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function could not find a font name for the specified font identifier.


Manual References:
Graphics: Controlling Text Fonts, Graphics: Controlling Text Fonts
Parameters:
Id
The Creo Parametric integer id of the font.
Returns:
The font object to be used to control the font of text graphics.



optional pfcFont_ptrGetFontByName (xrstring Name)

Returns a font object given a Creo Parametric font name.

The correspondance between font names and integer identifiers stays constant for a given Creo Parametric session, but may be different for different sessions.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The function could not find a font identifier for the specified font name.


Manual References:
Graphics: Controlling Text Fonts
Parameters:
Name
The font name
Returns:
The font object to be used to control the font of text graphics



xrealGetTextHeight ()
voidSetTextHeight (xreal value)

The text height of created text graphics.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The attributes were not set.


Manual References:
Graphics: Displaying Text in the Graphics Window, Graphics: Displaying Text in the Graphics Window




xrealGetRotationAngle ()
voidSetRotationAngle (xreal value)

The rotation angle of created text graphics (default is 0).

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The attributes were not set.


Manual References:
Graphics: Displaying Text in the Graphics Window, Graphics: Displaying Text in the Graphics Window




xrealGetSlantAngle ()
voidSetSlantAngle (xreal value)

The slant angle of created text graphics (default is 0).

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The attributes were not set.


Manual References:
Graphics: Displaying Text in the Graphics Window, Graphics: Displaying Text in the Graphics Window




xrealGetWidthFactor ()
voidSetWidthFactor (xreal value)

The width-to-height ratio for created text graphics.

Exceptions thrown (but not limited to):

pfcXToolkitNotFound - The attributes were not set.


Manual References:
Graphics: Displaying Text in the Graphics Window, Graphics: Displaying Text in the Graphics Window




voidResetTextAttributes ()

Resets the Creo Parametric text attributes to use the default settings
Returns:



pfcGraphicsModeGetCurrentGraphicsMode ()
voidSetCurrentGraphicsMode (pfcGraphicsMode value)

The mode used to display graphics (i.e. normal or complement).
Manual References:
Graphics: Controlling Graphics Display, Graphics: Controlling Graphics Display, Graphics: Controlling Graphics Display




pfcStdColorGetCurrentGraphicsColor ()
voidSetCurrentGraphicsColor (pfcStdColor value)

The standard color used to display new graphics.

Exceptions thrown (but not limited to):

pfcXToolkitNoChange - The current color is the same as the new color.


Manual References:
Graphics: Controlling Graphics Display, Graphics: Controlling Graphics Display, Graphics: Controlling Graphics Display, Graphics: Controlling Graphics Display