28 lines
834 B
Plaintext
28 lines
834 B
Plaintext
use orbtk::prelude::*;
|
|
|
|
fn main() {
|
|
// use this only if you want to run it as web application.
|
|
orbtk::initialize();
|
|
|
|
Application::new()
|
|
.window(|ctx| {
|
|
Window::create()
|
|
.title("OrbTk - image example")
|
|
.position((100.0, 100.0))
|
|
.size(610.0, 610.0)
|
|
.resizeable(true)
|
|
.child(
|
|
ImageWidget::create()
|
|
.image("resources/images/advotracker.jpg")
|
|
.margin(10.0)
|
|
.vertical_alignment("Center")
|
|
.horizontal_alignment("Center")
|
|
.size(600.0, 600.0)
|
|
.clip(true)
|
|
.build(ctx),
|
|
)
|
|
.build(ctx)
|
|
})
|
|
.run();
|
|
}
|