MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / text

Method text

dep/agg/src/agg2d.cpp:1067–1091  ·  view source on GitHub ↗

------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1065
1066//------------------------------------------------------------------------
1067void Agg2D::text(double x, double y, const std::string& text)
1068{
1069 agg::gsv_text t;
1070 t.flip(true);
1071 t.size(m_textSizeX, m_textSizeY);
1072 t.text(text.c_str());
1073 double w = t.text_width();
1074 switch (m_textAlignment)
1075 {
1076 case AlignLeft:
1077 break;
1078
1079 case AlignRight:
1080 x -= w;
1081 break;
1082
1083 case AlignCenter:
1084 x -= w/2.0;
1085 break;
1086 }
1087
1088 t.start_point(x, y);
1089 m_path.concat_path(t);
1090 drawPath();
1091}
1092
1093//------------------------------------------------------------------------
1094void Agg2D::closePolygon()

Callers 2

draw_y_axisFunction · 0.45
draw_x_axisFunction · 0.45

Calls 5

flipMethod · 0.80
text_widthMethod · 0.80
start_pointMethod · 0.80
concat_pathMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected