[DEBUG] build sample

This commit is contained in:
Edouard DUPIN 2016-07-19 22:24:23 +02:00
parent 27e440c4a3
commit fa32e8c008
3 changed files with 9 additions and 8 deletions

View File

@ -28,9 +28,9 @@ def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
my_module.add_module_depend(['egami', 'test-debug'])
my_module.add_src_file([
'test/main.cpp',
'test/read.cpp',
'test/write.cpp'
'sample/main.cpp',
'sample/read.cpp',
'sample/write.cpp'
])
my_module.copy_path('sample/read.bmp')
my_module.copy_path('sample/read.svg')

View File

@ -6,6 +6,7 @@
//! [egami_sample_read_all]
#include <test-debug/debug.h>
#include <etk/math/Vector2D.h>
//! [egami_sample_include]
#include <egami/egami.h>
//! [egami_sample_include]
@ -29,11 +30,11 @@ static void readSVG() {
//! [egami_sample_read_file_svg]
TEST_INFO("image exist (SVG): " << image.exist());
//! [egami_sample_read_file_svg_rescale]
image = egami::load("DATA:read.svg", ivec(800,600));
image = egami::load("DATA:read.svg", ivec2(800,600));
//! [egami_sample_read_file_svg_rescale]
TEST_INFO("image exist (SVG-rescale): " << image.exist());
//! [egami_sample_read_file_svg_scale_factor]
image = egami::load("DATA:read.svg", 0.5);
// TODO : image = egami::load("DATA:read.svg", 0.5);
//! [egami_sample_read_file_svg_scale_factor]
TEST_INFO("image exist (SVG-scale): " << image.exist());
}

View File

@ -14,9 +14,9 @@ static void writeBMP() {
//! [egami_sample_create_image]
// create an empty Image (no type and no inside data)
egami::Image image(ivec2(25,25));
image.set(ivec2(5,5), etk::Color<>(0x88, 0xFF, 0x00, 0xFF);
image.set(ivec2(12,15), etk::Color<>(0x88, 0xFF, 0x00, 0xFF);
image.set(ivec2(4,9), etk::Color<>(0x88, 0xFF, 0x00, 0xFF);
image.set(ivec2(5,5), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(12,15), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
image.set(ivec2(4,9), etk::Color<>(0x88, 0xFF, 0x00, 0xFF));
// ...
//! [egami_sample_create_image]
//! [egami_sample_write_file_bmp]