Image_surface の動作サンプル
#include <SDL.h>
using namespace hrk;
int main(int argc, char *argv[])
{
static_cast<void>(argc);
static_cast<void>(argv);
main_window.
show(
SizeF(640, 480));
Scene* scene = view.
front();
Layer* layer = scene->
front();
Label png_label(&png_surface);
Label png_label_2nd(&png_surface);
Label jpg_label(&jpg_surface);
Label jpg_label_2nd(&jpg_surface);
layer->
push_front(&png_label);
layer->push_front(&jpg_label);
layer->push_front(&png_label_2nd);
layer->push_front(&jpg_label_2nd);
int image_width = png_label.
width();
png_label_2nd.
set_position(
PointF(100, 100));
jpg_label.set_position(
PointF(image_width, 0));
jpg_label_2nd.set_position(
PointF(100 + image_width, 100));
view.redraw();
delay_sec(1.5);
return 0;
}