mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
fix example
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@601 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user