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

Fontsize type internal to SPStyle (also used by libnrtype/Layout-TNG-Input.cpp). More...

#include <style-internal.h>

Inheritance diagram for SPIFontSize:
SPIBase TypedSPI< SPAttr::FONT_SIZE, SPIFontSize >

Public Member Functions

 SPIFontSize ()
 
 ~SPIFontSize () 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
 
SPIFontSizeoperator= (const SPIFontSize &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

unsigned type: 2
 
unsigned unit: 4
 
unsigned literal: 4
 
float value
 
float computed
 
- Public Attributes inherited from SPIBase
bool inherits: 1
 
bool set: 1
 
bool inherit: 1
 
bool important: 1
 
SPStyleSrc style_src
 

Static Public Attributes

static float const font_size_default = 12.0
 

Private Member Functions

double relative_fraction () const
 

Static Private Attributes

static float const font_size_table [] = {6.0, 8.0, 10.0, 12.0, 14.0, 18.0, 24.0}
 Indexed by SP_CSS_FONT_SIZE_blah.
 

Additional Inherited Members

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

Detailed Description

Fontsize type internal to SPStyle (also used by libnrtype/Layout-TNG-Input.cpp).

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

Constructor & Destructor Documentation

◆ SPIFontSize()

SPIFontSize::SPIFontSize ( )
inline

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

References clear().

◆ ~SPIFontSize()

SPIFontSize::~SPIFontSize ( )
overridedefault

Member Function Documentation

◆ cascade()

◆ clear()

void SPIFontSize::clear ( )
inlineoverridevirtual

Reimplemented from SPIBase.

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

References SPIBase::clear(), computed, literal, SP_CSS_FONT_SIZE_MEDIUM, SP_CSS_UNIT_NONE, SP_FONT_SIZE_LITERAL, type, unit, and value.

Referenced by SPIFontSize().

◆ equals()

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

Reimplemented from SPIBase.

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

References computed, SPIBase::equals(), literal, SP_FONT_SIZE_LENGTH, SP_FONT_SIZE_LITERAL, type, and value.

◆ get_value()

◆ merge()

◆ operator=()

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

◆ read()

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

◆ relative_fraction()

double SPIFontSize::relative_fraction ( ) const
private

Member Data Documentation

◆ computed

float SPIFontSize::computed

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

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

◆ font_size_default

float const SPIFontSize::font_size_default = 12.0
static

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

Referenced by SPILength::read().

◆ font_size_table

float const SPIFontSize::font_size_table = {6.0, 8.0, 10.0, 12.0, 14.0, 18.0, 24.0}
staticprivate

Indexed by SP_CSS_FONT_SIZE_blah.

These seem a bit small

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

Referenced by cascade(), and merge().

◆ literal

unsigned SPIFontSize::literal

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

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

◆ type

unsigned SPIFontSize::type

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

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

◆ unit

unsigned SPIFontSize::unit

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

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

◆ value

float SPIFontSize::value

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