This commit is contained in:
parent
06645250ca
commit
dbb436f5a2
2 changed files with 16 additions and 16 deletions
|
|
@ -23,7 +23,7 @@ int main() {
|
|||
|
||||
w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, MwNtitle, "test", NULL);
|
||||
|
||||
vp = MwCreateWidget(MwViewportClass, "vp", w, 5 + 100, 5 + 100, 640 - 10 - 100, 480 - 10 - 100);
|
||||
vp = MwCreateWidget(MwViewportClass, "vp", w, 5 + 50, 5 + 50, 640 - 10 - 100, 480 - 10 - 100);
|
||||
|
||||
px = MwLoadImage(vp, "examples/picture.png");
|
||||
|
||||
|
|
@ -31,10 +31,11 @@ int main() {
|
|||
|
||||
if(px == NULL) px = MwLoadImage(vp, "picture.png");
|
||||
|
||||
MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024,
|
||||
MwNpixmap, px,
|
||||
NULL);
|
||||
// MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024,
|
||||
// MwNpixmap, px,
|
||||
// NULL);
|
||||
MwViewportSetSize(vp, 1024, 1024);
|
||||
MwCreateWidget(MwButtonClass, "btn", MwViewportGetViewport(vp), 256, 256, 128, 128);
|
||||
|
||||
MwAddUserHandler(w, MwNresizeHandler, resize, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue