⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (940 Bytes)
Bug #838
» TestSVG.cpp
Max Quatember
, 05/26/2011 10:33 AM
namespace
{
class
Painted
:
public
Wt
::
WPaintedWidget
{
public:
Painted
(
Wt
::
WContainerWidget
*
parent
=
0
)
:
Wt
::
WPaintedWidget
(
parent
)
{
setPreferredMethod
(
Wt
::
WPaintedWidget
::
InlineSvgVml
);
}
virtual
void
paintEvent
(
Wt
::
WPaintDevice
*
paintDevice
)
{
Wt
::
WPainter
painter
(
paintDevice
);
painter
.
setPen
(
Wt
::
SolidLine
);
painter
.
drawRect
(
painter
.
window
()
);
painter
.
restore
();
}
};
class
TestSVG
:
public
Wt
::
WApplication
{
public:
TestSVG
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
(
env
)
{
auto
p
=
new
Painted
(
root
()
);
p
->
setPositionScheme
(
Wt
::
Absolute
);
p
->
setOffsets
(
0
,
Wt
::
Top
);
p
->
setOffsets
(
0
,
Wt
::
Left
);
p
->
resize
(
100
,
4
);
p
=
new
Painted
(
root
()
);
p
->
setPositionScheme
(
Wt
::
Absolute
);
p
->
setOffsets
(
0
,
Wt
::
Top
);
p
->
setOffsets
(
0
,
Wt
::
Left
);
p
->
resize
(
100
,
100
);
}
};
}
« Previous
1
2
Next »
(1-1/2)
Loading...