Panda3D
Public Types | Public Member Functions | List of all members
PGFrameStyle Class Reference

Public Types

enum  Type {
  T_none = 0, T_flat = 1, T_bevel_out = 2, T_bevel_in = 3,
  T_groove = 4, T_ridge = 5, T_texture_border = 6
}
 

Public Member Functions

 __init__ ()
 
 __init__ (const PGFrameStyle copy)
 
 clearTexture ()
 Removes the texture from the frame. More...
 
LColor getColor ()
 Returns the dominant color of the frame. More...
 
LVecBase4 getInternalFrame (const LVecBase4 frame)
 Computes the size of the internal frame, given the indicated external frame, appropriate for this kind of frame style. More...
 
Texture getTexture ()
 Returns the texture that has been applied to the frame, or NULL if no texture has been applied. More...
 
PGFrameStyle::Type getType ()
 Returns the basic type of frame. More...
 
const LVecBase2 getUvWidth ()
 See set_uv_width(). More...
 
const LVecBase2 getVisibleScale ()
 Returns the scale factor on the visible representation of the frame, in the X and Y directions. More...
 
const LVecBase2 getWidth ()
 Returns the width parameter, which has meaning only for certain frame types. More...
 
bool hasTexture ()
 Returns true if a texture has been applied to the frame. More...
 
PGFrameStyle operator= (const PGFrameStyle copy)
 
 output (Ostream out)
 
 setColor (const LColor color)
 Sets the dominant color of the frame. More...
 
 setColor (float r, float g, float b, float a)
 Sets the dominant color of the frame. More...
 
 setTexture (Texture texture)
 Specifies a texture that should be applied to the frame. More...
 
 setType (PGFrameStyle::Type type)
 Sets the basic type of frame. More...
 
 setUvWidth (const LVecBase2 uv_width)
 Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width. More...
 
 setUvWidth (float u, float v)
 Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width. More...
 
 setVisibleScale (const LVecBase2 visible_scale)
 Sets a scale factor on the visible representation of the frame, in the X and Y directions. More...
 
 setVisibleScale (float x, float y)
 Sets a scale factor on the visible representation of the frame, in the X and Y directions. More...
 
 setWidth (const LVecBase2 width)
 Sets the width parameter, which has meaning only for certain frame types. More...
 
 setWidth (float x, float y)
 Sets the width parameter, which has meaning only for certain frame types. More...
 

Member Enumeration Documentation

◆ Type

enum Type
Enumerator
T_none 
T_flat 
T_bevel_out 
T_bevel_in 
T_groove 
T_ridge 
T_texture_border 

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( const PGFrameStyle  copy)

◆ clearTexture()

clearTexture ( )

Removes the texture from the frame.

◆ getColor()

LColor getColor ( )

Returns the dominant color of the frame.

◆ getInternalFrame()

LVecBase4 getInternalFrame ( const LVecBase4  frame)

Computes the size of the internal frame, given the indicated external frame, appropriate for this kind of frame style.

This simply subtracts the border width for those frame styles that include a border.

◆ getTexture()

Texture getTexture ( )

Returns the texture that has been applied to the frame, or NULL if no texture has been applied.

◆ getType()

PGFrameStyle::Type getType ( )

Returns the basic type of frame.

◆ getUvWidth()

const LVecBase2 getUvWidth ( )

See set_uv_width().

◆ getVisibleScale()

const LVecBase2 getVisibleScale ( )

Returns the scale factor on the visible representation of the frame, in the X and Y directions.

If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.

◆ getWidth()

const LVecBase2 getWidth ( )

Returns the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.

◆ hasTexture()

bool hasTexture ( )

Returns true if a texture has been applied to the frame.

◆ operator=()

PGFrameStyle operator= ( const PGFrameStyle  copy)

◆ output()

output ( Ostream  out)

◆ setColor() [1/2]

setColor ( const LColor  color)

Sets the dominant color of the frame.

◆ setColor() [2/2]

setColor ( float  r,
float  g,
float  b,
float  a 
)

Sets the dominant color of the frame.

◆ setTexture()

setTexture ( Texture  texture)

Specifies a texture that should be applied to the frame.

◆ setType()

setType ( PGFrameStyle::Type  type)

Sets the basic type of frame.

◆ setUvWidth() [1/2]

setUvWidth ( const LVecBase2  uv_width)

Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width.

◆ setUvWidth() [2/2]

setUvWidth ( float  u,
float  v 
)

Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner bevel–the width in texture space of the amount indicated by set_width.

◆ setVisibleScale() [1/2]

setVisibleScale ( const LVecBase2  visible_scale)

Sets a scale factor on the visible representation of the frame, in the X and Y directions.

If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.

◆ setVisibleScale() [2/2]

setVisibleScale ( float  x,
float  y 
)

Sets a scale factor on the visible representation of the frame, in the X and Y directions.

If this scale factor is other than 1, it will affect the size of the visible frame representation within the actual frame border.

◆ setWidth() [1/2]

setWidth ( const LVecBase2  width)

Sets the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.

◆ setWidth() [2/2]

setWidth ( float  x,
float  y 
)

Sets the width parameter, which has meaning only for certain frame types.

For instance, this is the width of the bevel for T_bevel_in or T_bevel_out. The units are in screen units.