LibreOffice Module filter (master) 1
|
#include <svgwriter.hxx>
Public Member Functions | |
SVGAttributeWriter (SVGExport &rExport, SVGFontExport &rFontExport, SVGState &rCurState) | |
~SVGAttributeWriter () | |
void | AddColorAttr (const OUString &pColorAttrName, const OUString &pColorOpacityAttrName, const Color &rColor) |
void | AddGradientDef (const tools::Rectangle &rObjRect, const Gradient &rGradient, OUString &rGradientId) |
void | AddPaintAttr (const Color &rLineColor, const Color &rFillColor, const tools::Rectangle *pObjBoundRect=nullptr, const Gradient *pFillGradient=nullptr) |
void | SetFontAttr (const vcl::Font &rFont) |
void | startFontSettings () |
void | endFontSettings () |
void | setFontFamily () |
Static Public Member Functions | |
static void | ImplGetColorStr (const Color &rColor, OUString &rColorStr) |
Static Private Member Functions | |
static double | ImplRound (double fVal) |
Private Attributes | |
SVGExport & | mrExport |
SVGFontExport & | mrFontExport |
SVGState & | mrCurrentState |
std::unique_ptr< SvXMLElementExport > | mpElemFont |
Definition at line 131 of file svgwriter.hxx.
SVGAttributeWriter::SVGAttributeWriter | ( | SVGExport & | rExport, |
SVGFontExport & | rFontExport, | ||
SVGState & | rCurState | ||
) |
Definition at line 148 of file svgwriter.cxx.
SVGAttributeWriter::~SVGAttributeWriter | ( | ) |
Definition at line 156 of file svgwriter.cxx.
void SVGAttributeWriter::AddColorAttr | ( | const OUString & | pColorAttrName, |
const OUString & | pColorOpacityAttrName, | ||
const Color & | rColor | ||
) |
Definition at line 179 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), Color::GetAlpha(), ImplGetColorStr(), ImplRound(), SVGExport::IsUseOpacity(), mrExport, and XML_NAMESPACE_NONE.
Referenced by AddPaintAttr().
void SVGAttributeWriter::AddGradientDef | ( | const tools::Rectangle & | rObjRect, |
const Gradient & | rGradient, | ||
OUString & | rGradientId | ||
) |
Definition at line 221 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), aXMLAttrCX, aXMLAttrCY, aXMLAttrGradientUnits, aXMLAttrId, aXMLAttrOffset, aXMLAttrStopColor, aXMLAttrX1, aXMLAttrX2, aXMLAttrY1, aXMLAttrY2, aXMLElemDefs, aXMLElemLinearGradient, aXMLElemStop, tools::Rectangle::Bottom(), tools::Rectangle::Center(), Gradient::GetAngle(), Color::GetBlue(), Gradient::GetBorder(), tools::Polygon::GetBoundRect(), Gradient::GetEndColor(), Gradient::GetEndIntensity(), Color::GetGreen(), tools::Rectangle::GetHeight(), Gradient::GetOfsX(), Gradient::GetOfsY(), Color::GetRed(), Gradient::GetStartColor(), Gradient::GetStartIntensity(), Gradient::GetStyle(), tools::Rectangle::GetWidth(), ImplGetColorStr(), ImplRound(), tools::Rectangle::Left(), mrExport, tools::Polygon::Rotate(), Color::SetBlue(), Color::SetGreen(), Color::SetRed(), tools::Rectangle::Top(), X, Point::X(), XML_NAMESPACE_NONE, and Y.
Referenced by AddPaintAttr().
void SVGAttributeWriter::AddPaintAttr | ( | const Color & | rLineColor, |
const Color & | rFillColor, | ||
const tools::Rectangle * | pObjBoundRect = nullptr , |
||
const Gradient * | pFillGradient = nullptr |
||
) |
Definition at line 197 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), AddColorAttr(), AddGradientDef(), aXMLAttrFill, mrExport, and XML_NAMESPACE_NONE.
Referenced by SVGActionWriter::ImplWriteActions(), SVGTextWriter::implWriteBulletChars(), SVGActionWriter::ImplWriteShape(), SVGActionWriter::ImplWriteText(), and SVGTextWriter::implWriteTextPortion().
void SVGAttributeWriter::endFontSettings | ( | ) |
Definition at line 427 of file svgwriter.cxx.
References mpElemFont.
Referenced by startFontSettings().
|
static |
Definition at line 167 of file svgwriter.cxx.
References Color::GetAlpha(), Color::GetBlue(), Color::GetGreen(), and Color::GetRed().
Referenced by AddColorAttr(), AddGradientDef(), and SVGActionWriter::ImplWriteGradientStop().
|
staticprivate |
Definition at line 161 of file svgwriter.cxx.
Referenced by AddColorAttr(), and AddGradientDef().
void SVGAttributeWriter::SetFontAttr | ( | const vcl::Font & | rFont | ) |
Definition at line 342 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), SVGState::aFont, aXMLAttrFontSize, aXMLAttrFontStyle, aXMLAttrFontWeight, aXMLAttrTextDecoration, vcl::Font::GetFontHeight(), vcl::Font::GetItalic(), vcl::Font::GetStrikeout(), vcl::Font::GetUnderline(), vcl::Font::GetWeight(), SVGExport::IsUseNativeTextDecoration(), ITALIC_NONE, ITALIC_OBLIQUE, LINESTYLE_NONE, mrCurrentState, mrExport, setFontFamily(), startFontSettings(), STRIKEOUT_NONE, WEIGHT_BLACK, WEIGHT_BOLD, WEIGHT_LIGHT, WEIGHT_MEDIUM, WEIGHT_NORMAL, WEIGHT_SEMIBOLD, WEIGHT_SEMILIGHT, WEIGHT_THIN, WEIGHT_ULTRABOLD, WEIGHT_ULTRALIGHT, and XML_NAMESPACE_NONE.
Referenced by SVGActionWriter::ImplWriteActions().
void SVGAttributeWriter::setFontFamily | ( | ) |
Definition at line 433 of file svgwriter.cxx.
References SvXMLExport::AddAttribute(), SVGState::aFont, aXMLAttrFontFamily, FAMILY_ROMAN, FAMILY_SWISS, vcl::Font::GetFamilyName(), vcl::Font::GetFamilyType(), SVGFontExport::GetMappedFontName(), vcl::Font::GetPitch(), SVGExport::IsUsePositionedCharacters(), mrCurrentState, mrExport, mrFontExport, PITCH_FIXED, and XML_NAMESPACE_NONE.
Referenced by SetFontAttr().
void SVGAttributeWriter::startFontSettings | ( | ) |
Definition at line 413 of file svgwriter.cxx.
References aXMLElemG, aXMLElemTspan, endFontSettings(), SVGExport::IsUsePositionedCharacters(), mpElemFont, mrExport, and XML_NAMESPACE_NONE.
Referenced by SetFontAttr().
|
private |
Definition at line 138 of file svgwriter.hxx.
Referenced by endFontSettings(), and startFontSettings().
|
private |
Definition at line 137 of file svgwriter.hxx.
Referenced by SetFontAttr(), and setFontFamily().
|
private |
Definition at line 135 of file svgwriter.hxx.
Referenced by AddColorAttr(), AddGradientDef(), AddPaintAttr(), SetFontAttr(), setFontFamily(), and startFontSettings().
|
private |
Definition at line 136 of file svgwriter.hxx.
Referenced by setFontFamily().