20 _color.set(1.0f, 1.0f, 1.0f, 1.0f);
21 _width.set(0.1f, 0.1f);
22 _uv_width.set(0.1f, 0.1f);
23 _visible_scale.set(1.0f, 1.0f);
33 _texture(copy._texture),
35 _uv_width(copy._uv_width),
36 _visible_scale(copy._visible_scale)
43 INLINE
void PGFrameStyle::
47 _texture = copy._texture;
49 _uv_width = copy._uv_width;
50 _visible_scale = copy._visible_scale;
80 set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a) {
113 return !_texture.is_null();
180 _uv_width = uv_width;
208 _visible_scale = visible_scale;
219 return _visible_scale;
225 INLINE std::ostream &
226 operator << (std::ostream &out,
const PGFrameStyle &pfs) {
void set_texture(Texture *texture)
Specifies a texture that should be applied to the frame.
void set_visible_scale(PN_stdfloat x, PN_stdfloat y)
Sets a scale factor on the visible representation of the frame, in the X and Y directions.
Type get_type() const
Returns the basic type of frame.
void set_width(PN_stdfloat x, PN_stdfloat y)
Sets the width parameter, which has meaning only for certain frame types.
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
void set_type(Type type)
Sets the basic type of frame.
void set_uv_width(PN_stdfloat u, PN_stdfloat v)
Sets the uv_width parameter, which indicates the amount of the texture that is consumed by the inner ...
bool has_texture() const
Returns true if a texture has been applied to the frame.
LColor get_color() const
Returns the dominant color of the frame.
Texture * get_texture() const
Returns the texture that has been applied to the frame, or NULL if no texture has been applied.
const LVecBase2 & get_visible_scale() const
Returns the scale factor on the visible representation of the frame, in the X and Y directions.
void set_color(PN_stdfloat r, PN_stdfloat g, PN_stdfloat b, PN_stdfloat a)
Sets the dominant color of the frame.
const LVecBase2 & get_uv_width() const
See set_uv_width().
const LVecBase2 & get_width() const
Returns the width parameter, which has meaning only for certain frame types.
void clear_texture()
Removes the texture from the frame.