203 , family( family_value )
226 if( tx != 0.0 || ty != 0.0 ) {
227 out <<
"translate( " << tx <<
", " << ty <<
" )";
238 if( cx != 0.0 || cy != 0.0 ) {
239 out <<
"rotate( " << a <<
", " << cx <<
", " << cy <<
" )";
241 out <<
"rotate( " << a <<
" )";
252 if( sx != 1.0 || sy != 1.0 ) {
254 out <<
"scale( " << sx <<
" )";
256 out <<
"scale( " << sx <<
", " << sy <<
" )";
268 out <<
"skewX( " << ax <<
" )";
270 if( ax != 0.0 && ay != 0.0 ) {
274 out <<
"skewY( " << ay <<
" )";
284 if( a != 1.0 || b != 0.0 || c != 0.0 || d != 1.0 || e != 0.0 || f != 0.0 ) {
285 out <<
"matrix( " << a <<
", " << b <<
", " << c <<
", ";
286 out << d <<
", " << e <<
", " << f <<
" )";
296 transformations.push_back( std::move( t ));
301 transformations.push_back( t );
306 if( ! transformations.empty() ) {
307 out <<
" transform=\"";
308 for(
auto const& t : transformations ) {
309 if( &t != &transformations[0] ) {
Skip no whitespace. Thus, immediately treat the current input char.
void write(std::ostream &out) const
std::string svg_attribute(std::string const &name, T const &value, std::string const &unit="")
void write(std::ostream &out) const
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
std::string join(T const &v, std::string const &delimiter=", ")
Return a string where the elements of a container v are joined using the string delimiter in between ...
SvgFill(Type type=Type::kColor)
Provides some commonly used string utility functions.
SvgFont(double size=10, std::string const &family="Verdana")
std::string color_to_hex(Color const &c, std::string const &prefix, bool uppercase, bool with_alpha)
Return a hex string representation of a Color in the format "#003366[ff]".
std::vector< double > dash_array
void write(std::ostream &out) const
SvgStroke(Type type=Type::kColor)