Library | Module

Interface IpfcDisplay



Description

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

To maintain displayed graphics even after a window repaint create an instance of IpfcDisplayList2D or IpfcDisplayList3D and place the graphics calls in the display list's IpfcDisplayListener.OnDisplay() method.
Direct Parent Classes:
IpfcParent
Direct Known Subclasses:
IpfcBaseSession



Property Summary

PropertyCurrentFontas IpfcFont
The current font used for text graphics in Creo Parametric.
PropertyCurrentGraphicsColoras IpfcStdColor
The standard color used to display new graphics.
PropertyCurrentGraphicsModeas IpfcGraphicsMode
The mode used to display graphics (i.e. normal or complement).
PropertyDefaultFontas IpfcFont
The default font for this session of Creo Parametric.
PropertyRotationAngleas Double
The rotation angle of created text graphics (default is 0).
PropertySlantAngleas Double
The slant angle of created text graphics (default is 0).
PropertyTextHeightas Double
The text height of created text graphics.
PropertyWidthFactoras Double
The width-to-height ratio for created text graphics.



Method Summary

FunctionCreateDisplayList2D (Id as Long, Transform as IpfcScreenTransform, Action as IpfcDisplayListener) as IpfcDisplayList2D
Creates a two-dimensional display list
FunctionCreateDisplayList3D (Id as Long, Action as IpfcDisplayListener) as IpfcDisplayList3D
Creates a three-dimensional display list entity
SubDrawArc2D (Center as IpfcPoint3D, Radius as Double, StartDirection as IpfcVector3D, EndDirection as IpfcVector3D)
Draws an arc on the screen
SubDrawCircle (Center as IpfcPoint3D, Radius as Double)
Draws a circle on the screen
SubDrawLine (Endpoint as IpfcPoint3D)
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 IpfcDisplay.SetPenPosition()
SubDrawPolygon2D (Vertices as IpfcPoint2Ds, FillColor as IpfcStdColor [optional])
Draws two-dimensional polygon on the screen.
SubDrawPolyline (Points as IpfcPoint3Ds)
Draws a series of connected line segments on the screen.
SubDrawText2D (StartPoint as IpfcPoint3D, TextLine as String)
Draws text on the screen
FunctionGetFontById (Id as Long) as IpfcFont [optional]
Creates a font object given a Creo Parametric font integer id.
FunctionGetFontByName (Name as String) as IpfcFont [optional]
Returns a font object given a Creo Parametric font name.
SubInvalidate (Model as IpfcModel)
Invalidates the display list of the model singalling that a repaint is needed.
SubResetTextAttributes ()
Resets the Creo Parametric text attributes to use the default settings
SubSetPenPosition (NewPosition as IpfcPoint3D)
This method enables you to move to a point without producing any graphical output. This method is used when drawing lines using IpfcDisplay.DrawLine()



Property Detail


PropertyCurrentFontas IpfcFont

The current font used for text graphics in Creo Parametric.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - This means either:

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






PropertyCurrentGraphicsColoras IpfcStdColor

The standard color used to display new graphics.

Exceptions thrown (but not limited to):

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






PropertyCurrentGraphicsModeas IpfcGraphicsMode

The mode used to display graphics (i.e. normal or complement).




PropertyDefaultFontas IpfcFont

The default font for this session of Creo Parametric.

Exceptions thrown (but not limited to):

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






PropertyRotationAngleas Double

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

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The attributes were not set.






PropertySlantAngleas Double

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

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The attributes were not set.






PropertyTextHeightas Double

The text height of created text graphics.

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The attributes were not set.






PropertyWidthFactoras Double

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

Exceptions thrown (but not limited to):

IpfcXToolkitNotFound - The attributes were not set.







Method Detail


FunctionCreateDisplayList2D (Id as Long, Transform as IpfcScreenTransform, Action as IpfcDisplayListener) as IpfcDisplayList2D

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.
Parameters:
Id
 
Transform
The transformation matrix to be applied to the entities of the display list.
Action
The user-defined IpfcDisplayListener that calls IpfcDisplay methods to populate the display.
Returns:
The newly created DisplayList2D class instance



FunctionCreateDisplayList3D (Id as Long, Action as IpfcDisplayListener) as IpfcDisplayList3D

Creates a three-dimensional display list entity
Parameters:
Id
The identifier of the display list. This number must be unique.
Action
The user-defined IpfcDisplayListener that calls IpfcDisplay methods to create the display list.
Returns:
The newly-created DisplayList3D class instance



SubDrawArc2D (Center as IpfcPoint3D, Radius as Double, StartDirection as IpfcVector3D, EndDirection as IpfcVector3D)

Draws an arc on the screen

All points are in logical screen cordinates
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



SubDrawCircle (Center as IpfcPoint3D, Radius as Double)

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.
Parameters:
Center
The center of the circle
Radius
The radius of the circle



SubDrawLine (Endpoint as IpfcPoint3D)

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 IpfcDisplay.SetPenPosition()

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.
Parameters:
Endpoint
 



SubDrawPolygon2D (Vertices as IpfcPoint2Ds, FillColor as IpfcStdColor [optional])

Draws two-dimensional polygon on the screen.

Exceptions thrown (but not limited to):

IpfcXToolkitLineTooLong - You specified more than 100 points.


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.



SubDrawPolyline (Points as IpfcPoint3Ds)

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.
Parameters:
Points
 



SubDrawText2D (StartPoint as IpfcPoint3D, TextLine as String)

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 IpfcDisplay object.

Exceptions thrown (but not limited to):

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


Parameters:
StartPoint
The starting point for text display, in logical screen coordinates
TextLine
The text to display



FunctionGetFontById (Id as Long) as IpfcFont [optional]

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):

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


Parameters:
Id
The Creo Parametric integer id of the font.
Returns:
The font object to be used to control the font of text graphics.



FunctionGetFontByName (Name as String) as IpfcFont [optional]

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):

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


Parameters:
Name
The font name
Returns:
The font object to be used to control the font of text graphics



SubInvalidate (Model as IpfcModel)

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

Exceptions thrown (but not limited to):

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

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


Parameters:
Model
The part, assembly or drawing



SubResetTextAttributes ()

Resets the Creo Parametric text attributes to use the default settings



SubSetPenPosition (NewPosition as IpfcPoint3D)

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

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.
Parameters:
NewPosition