fix example

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@601 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-05 04:08:31 +00:00
parent 57a90cf17e
commit 82e10e6c94

View File

@@ -18,11 +18,18 @@ static void resize(MwWidget handle, void* user, void* call) {
int main() { int main() {
MwWidget w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, MwNtitle, "test", NULL); MwWidget w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, MwNtitle, "test", NULL);
MwLLPixmap px;
vp = MwCreateWidget(MwViewportClass, "vp", w, 5, 5, 630, 470); vp = MwCreateWidget(MwViewportClass, "vp", w, 5, 5, 630, 470);
px = MwLoadImage(vp, "examples/picture.png");
if(px == NULL) px = MwLoadImage(vp, "../examples/picture.png");
if(px == NULL) px = MwLoadImage(vp, "picture.png");
MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024, MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024,
MwNpixmap, MwLoadImage(vp, "examples/picture.png"), MwNpixmap, px,
NULL); NULL);
MwViewportSetSize(vp, 1024, 1024); MwViewportSetSize(vp, 1024, 1024);