7 #include <Wt/WContainerWidget>
8 #include <Wt/WGridLayout>
22 text +=
"<h2>Paint example</h2>";
25 "<p>A simple example demonstrating cross-browser vector graphics."
27 "<p>The emweb logo below is painted using the Wt WPainter API from "
28 "bezier paths, and rendered to the browser using inline SVG, inline VML "
29 "or the HTML 5 <canvas> element."
32 "The example also demonstrates the horizontal and vertical "
33 "<a href=\"http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WSlider.html\" target=\"_blank\">"
34 "WSlider</a> widgets. Here,"
35 "the events of the WSlider widgets are used to scale and rotate the "
39 "In non-IE browsers, a different backend is used for positive or negative "
40 "angles (SVG or HTML canvas)."
43 new WText(text,
this);
49 emweb->setLayout(layout);
57 scaleSlider->
resize(300, 50);
68 rotateSlider->
resize(50, 400);
87 : WPaintedWidget::HtmlCanvas);
void setMinimum(int minimum)
virtual void resize(const WLength &width, const WLength &height)
void setTickInterval(int tickInterval)
JSignal< int > & sliderMoved()
PaintExample(WContainerWidget *root, bool showTitle=true)
void addWidget(WWidget *widget, int row, int column, WFlags< AlignmentFlag > alignment=0)
void setMaximum(int maximum)
virtual void setValue(int value)
void setTickPosition(WFlags< TickPosition > tickPosition)