Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPIFloat Class Reference

Float type internal to SPStyle. (Only 'stroke-miterlimit') More...

#include <style-internal.h>

Inheritance diagram for SPIFloat:
SPIBase TypedSPI< SPAttr::STROKE_MITERLIMIT, SPIFloat >

Public Member Functions

 SPIFloat (float value_default=0.0)
 
 ~SPIFloat () override=default
 
void read (gchar const *str) override
 
const Glib::ustring get_value () const override
 
void clear () override
 
void cascade (const SPIBase *const parent) override
 
void merge (const SPIBase *const parent) override
 
SPIFloatoperator= (const SPIFloat &rhs)=default
 
bool equals (const SPIBase &rhs) const override
 
- Public Member Functions inherited from SPIBase
 SPIBase (bool inherits_=true)
 
virtual ~SPIBase ()=default
 
void readIfUnset (gchar const *str, SPStyleSrc source=SPStyleSrc::STYLE_PROP)
 
void readAttribute (Inkscape::XML::Node *repr)
 
bool shall_write (guint const flags=SP_STYLE_FLAG_IFSET, SPStyleSrc const &style_src_req=SPStyleSrc::STYLE_PROP, SPIBase const *const base=nullptr) const
 Check if this property should be written.
 
virtual const Glib::ustring write (guint const flags=SP_STYLE_FLAG_IFSET, SPStyleSrc const &style_src_req=SPStyleSrc::STYLE_PROP, SPIBase const *const base=nullptr) const
 Compile this style conditionally into a 'name: value' string suitable for css attrs.
 
void overwrite (const SPIBase *const other)
 
void setStylePointer (SPStyle *style_in)
 
SPIBaseoperator= (const SPIBase &rhs)=default
 
bool operator== (const SPIBase &rhs) const
 
virtual SPAttr id () const
 
Glib::ustring const & name () const
 

Public Attributes

float value = 0.0
 
- Public Attributes inherited from SPIBase
bool inherits: 1
 
bool set: 1
 
bool inherit: 1
 
bool important: 1
 
SPStyleSrc style_src
 

Private Attributes

float value_default = 0.0
 

Additional Inherited Members

- Protected Member Functions inherited from SPIBase
char const * important_str () const
 
- Protected Attributes inherited from SPIBase
SPStylestyle
 

Detailed Description

Float type internal to SPStyle. (Only 'stroke-miterlimit')

Definition at line 238 of file style-internal.h.

Constructor & Destructor Documentation

◆ SPIFloat()

SPIFloat::SPIFloat ( float  value_default = 0.0)
inline

Definition at line 242 of file style-internal.h.

◆ ~SPIFloat()

SPIFloat::~SPIFloat ( )
overridedefault

Member Function Documentation

◆ cascade()

void SPIFloat::cascade ( const SPIBase *const  parent)
overridevirtual

Implements SPIBase.

Definition at line 224 of file style-internal.cpp.

References SPIBase::inherit, SPIBase::inherits, parent, SPIBase::set, and value.

◆ clear()

void SPIFloat::clear ( )
inlineoverridevirtual

Reimplemented from SPIBase.

Definition at line 250 of file style-internal.h.

References SPIBase::clear(), value, and value_default.

◆ equals()

bool SPIFloat::equals ( const SPIBase rhs) const
overridevirtual

Reimplemented from SPIBase.

Definition at line 248 of file style-internal.cpp.

References SPIBase::equals(), and value.

◆ get_value()

const Glib::ustring SPIFloat::get_value ( ) const
overridevirtual

Implements SPIBase.

Definition at line 217 of file style-internal.cpp.

References Inkscape::ustring::format_classic(), SPIBase::inherit, and value.

◆ merge()

void SPIFloat::merge ( const SPIBase *const  parent)
overridevirtual

Implements SPIBase.

Definition at line 233 of file style-internal.cpp.

References SPIBase::inherit, SPIBase::inherits, parent, SPIBase::set, and value.

◆ operator=()

SPIFloat & SPIFloat::operator= ( const SPIFloat rhs)
default

◆ read()

void SPIFloat::read ( gchar const *  str)
overridevirtual

Implements SPIBase.

Definition at line 200 of file style-internal.cpp.

References SPIBase::inherit, SPIBase::set, sp_svg_number_read_f(), and value.

Member Data Documentation

◆ value

float SPIFloat::value = 0.0

Definition at line 264 of file style-internal.h.

Referenced by cascade(), clear(), equals(), get_value(), merge(), and read().

◆ value_default

float SPIFloat::value_default = 0.0
private

Definition at line 267 of file style-internal.h.

Referenced by clear().


The documentation for this class was generated from the following files: