forked from pyrite-dev/milsko
fix example
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@601 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
57a90cf17e
commit
82e10e6c94
1 changed files with 8 additions and 1 deletions
|
|
@ -18,11 +18,18 @@ static void resize(MwWidget handle, void* user, void* call) {
|
|||
|
||||
int main() {
|
||||
MwWidget w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, MwNtitle, "test", NULL);
|
||||
MwLLPixmap px;
|
||||
|
||||
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,
|
||||
MwNpixmap, MwLoadImage(vp, "examples/picture.png"),
|
||||
MwNpixmap, px,
|
||||
NULL);
|
||||
MwViewportSetSize(vp, 1024, 1024);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue