mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-12 22:03:43 -06:00
Drawing refactored
git-svn-id: svn://ultimatepp.org/upp/trunk@1099 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f94489f556
commit
d60e6b538c
24 changed files with 1222 additions and 639 deletions
|
|
@ -5,29 +5,12 @@ NAMESPACE_UPP
|
|||
#ifdef PLATFORM_WIN32
|
||||
#ifndef PLATFORM_WINCE
|
||||
|
||||
static void wsMetaDraw(Draw& w, Stream& s, const DrawingPos& ps) {
|
||||
Rect r;
|
||||
WinMetaFile wmf;
|
||||
s % r % wmf;
|
||||
wmf.Paint(w, ps(r));
|
||||
}
|
||||
|
||||
INITBLOCK {
|
||||
Draw::Register(555, wsMetaDraw);
|
||||
};
|
||||
|
||||
void WinMetaFile::Init() {
|
||||
hemf = NULL;
|
||||
}
|
||||
|
||||
void WinMetaFile::Paint(Draw& w, const Rect& r) const {
|
||||
ChkP();
|
||||
DrawingDraw *dw = dynamic_cast<DrawingDraw *>(&w);
|
||||
if(dw) {
|
||||
Stream& s = dw->DrawingOp(555) % const_cast<Rect&>(r);
|
||||
s % const_cast<WinMetaFile&>(*this);
|
||||
return;
|
||||
}
|
||||
if(hemf)
|
||||
PlayEnhMetaFile(w, hemf, r);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue