# PGFrameStyle¶

class PGFrameStyle

Inheritance diagram

enum Type
enumerator T_none = 0
enumerator T_flat = 1
enumerator T_bevel_out = 2
enumerator T_bevel_in = 3
enumerator T_groove = 4
enumerator T_ridge = 5
enumerator T_texture_border = 6
PGFrameStyle(void)
PGFrameStyle(PGFrameStyle const &copy)
void clear_texture(void)

Removes the texture from the frame.

LColor get_color(void) const

Returns the dominant color of the frame.

LVecBase4 get_internal_frame(LVecBase4 const &frame) const

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.

Texture *get_texture(void) const

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

Type get_type(void) const

Returns the basic type of frame.

LVecBase2 const &get_uv_width(void) const
LVecBase2 const &get_visible_scale(void) const

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.

LVecBase2 const &get_width(void) const

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.

bool has_texture(void) const

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

void output(std::ostream &out) const
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a)
void set_color(LColor const &color)

Sets the dominant color of the frame.

void set_texture(Texture *texture)

Specifies a texture that should be applied to the frame.

void set_type(PGFrameStyle::Type type)

Sets the basic type of frame.

void set_uv_width(PN_stdfloat u, PN_stdfloat v)
void set_uv_width(LVecBase2 const &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().

void set_visible_scale(PN_stdfloat x, PN_stdfloat y)
void set_visible_scale(LVecBase2 const &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.

void set_width(PN_stdfloat x, PN_stdfloat y)
void set_width(LVecBase2 const &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.