Inkscape
Vector Graphics Editor
|
Length type internal to SPStyle. More...
#include <style-internal.h>
Public Member Functions | |
SPILength (float value=0) | |
~SPILength () 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 |
SPILength & | operator= (const SPILength &rhs)=default |
bool | equals (const SPIBase &rhs) const override |
void | setDouble (double v) |
virtual const Glib::ustring | toString (bool wname=false) const |
![]() | |
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) |
SPIBase & | operator= (const SPIBase &rhs)=default |
bool | operator== (const SPIBase &rhs) const |
virtual SPAttr | id () const |
Glib::ustring const & | name () const |
Public Attributes | |
unsigned | unit: 4 |
float | value = 0.f |
float | computed = 0.f |
![]() | |
bool | inherits: 1 |
bool | set: 1 |
bool | inherit: 1 |
bool | important: 1 |
SPStyleSrc | style_src |
Private Attributes | |
float | value_default = 0.f |
Additional Inherited Members | |
![]() | |
char const * | important_str () const |
![]() | |
SPStyle * | style |
Length type internal to SPStyle.
Definition at line 358 of file style-internal.h.
|
inline |
Definition at line 362 of file style-internal.h.
|
overridedefault |
|
overridevirtual |
Implements SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 454 of file style-internal.cpp.
References computed, SPStyle::font_size, SPIBase::inherit, SPIBase::inherits, LINE_HEIGHT, parent, SPIBase::set, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_PERCENT, SPIBase::style, unit, and value.
Referenced by SPILengthOrNormal::cascade().
|
inlineoverridevirtual |
Reimplemented from SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 374 of file style-internal.h.
References SPIBase::clear(), computed, SP_CSS_UNIT_NONE, unit, value, and value_default.
Referenced by SPILengthOrNormal::clear().
|
overridevirtual |
Reimplemented from SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 538 of file style-internal.cpp.
References computed, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_PERCENT, and unit.
Referenced by SPILengthOrNormal::equals().
|
overridevirtual |
Implements SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 418 of file style-internal.cpp.
References computed, Inkscape::Util::Quantity::convert(), Inkscape::ustring::format_classic(), SPIBase::inherit, SP_CSS_UNIT_CM, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_IN, SP_CSS_UNIT_MM, SP_CSS_UNIT_NONE, SP_CSS_UNIT_PC, SP_CSS_UNIT_PERCENT, SP_CSS_UNIT_PT, SP_CSS_UNIT_PX, sp_style_get_css_unit_string(), unit, and value.
Referenced by SPILengthOrNormal::get_value(), and SPIEnum< _SPCSSFontVariantEastAsian_int >::update_computed().
|
overridevirtual |
Implements SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 479 of file style-internal.cpp.
References computed, SPStyle::font_size, SPIBase::inherit, SPIBase::inherits, parent, SPIBase::set, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_NONE, SPIBase::style, unit, and value.
Referenced by SPILengthOrNormal::merge().
|
overridevirtual |
Implements SPIBase.
Reimplemented in SPILengthOrNormal.
Definition at line 336 of file style-internal.cpp.
References computed, Inkscape::Util::Quantity::convert(), SPStyle::font_size, SPIFontSize::font_size_default, SPIBase::inherit, LINE_HEIGHT, SPIBase::set, SP_CSS_UNIT_CM, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_IN, SP_CSS_UNIT_MM, SP_CSS_UNIT_NONE, SP_CSS_UNIT_PC, SP_CSS_UNIT_PERCENT, SP_CSS_UNIT_PT, SP_CSS_UNIT_PX, SPIBase::style, unit, and value.
Referenced by Inkscape::UI::Toolbar::TextToolbar::fontsize_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), SPILengthOrNormal::read(), and SPIDashArray::read().
void SPILength::setDouble | ( | double | v | ) |
Definition at line 514 of file style-internal.cpp.
References computed, SP_CSS_UNIT_NONE, unit, value, and value_default.
Referenced by Inkscape::Extension::Internal::Emf::select_extpen(), Inkscape::Extension::Internal::Emf::select_pen(), and Inkscape::Extension::Internal::Wmf::select_pen().
|
virtual |
Definition at line 523 of file style-internal.cpp.
float SPILength::computed = 0.f |
Definition at line 393 of file style-internal.h.
Referenced by cascade(), clear(), equals(), get_value(), merge(), read(), SPILengthOrNormal::read(), and setDouble().
unsigned SPILength::unit |
Definition at line 391 of file style-internal.h.
Referenced by cascade(), clear(), equals(), Inkscape::UI::Toolbar::TextToolbar::fontsize_unit_changed(), get_value(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), merge(), read(), SPILengthOrNormal::read(), and setDouble().
float SPILength::value = 0.f |
Definition at line 392 of file style-internal.h.
Referenced by cascade(), clear(), fix_blank_line(), fix_line_spacing(), get_value(), merge(), read(), SPILengthOrNormal::read(), SPIDashArray::read(), and setDouble().
|
private |
Definition at line 396 of file style-internal.h.
Referenced by clear(), and setDouble().