mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
better layout
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@343 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
30
examples/basic/image.c
Normal file
30
examples/basic/image.c
Normal file
@@ -0,0 +1,30 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/Milsko.h>
|
||||
|
||||
int main() {
|
||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
|
||||
MwNtitle, "image image",
|
||||
NULL);
|
||||
MwWidget image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400);
|
||||
MwWidget image2 = MwCreateWidget(MwImageClass, "image", window, 250, 50, 200, 200);
|
||||
MwWidget image3 = MwCreateWidget(MwImageClass, "image", window, 250, 250, 200, 200);
|
||||
MwLLPixmap px = MwLoadImage(window, "examples/picture.png");
|
||||
MwLLPixmap px2 = MwLoadImage(window, "examples/picture.jpg");
|
||||
MwLLPixmap px3 = MwLoadImage(window, "resource/logo.png");
|
||||
|
||||
MwVaApply(window,
|
||||
MwNiconPixmap, px,
|
||||
NULL);
|
||||
|
||||
MwVaApply(image,
|
||||
MwNpixmap, px,
|
||||
NULL);
|
||||
MwVaApply(image2,
|
||||
MwNpixmap, px2,
|
||||
NULL);
|
||||
MwVaApply(image3,
|
||||
MwNpixmap, px3,
|
||||
NULL);
|
||||
|
||||
MwLoop(window);
|
||||
}
|
||||
Reference in New Issue
Block a user