examples pictures: updated for case cover.
authorHermet Park <chuneon.park@samsung.com>
Mon, 15 Nov 2021 09:06:59 +0000 (18:06 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 17 Nov 2021 04:16:32 +0000 (13:16 +0900)
+ test opacity

src/examples/PictureJpg.cpp
src/examples/PicturePng.cpp

index 7f4e6c5d81c7ddc5c9308478128a5f64f71b085d..0dc6d35c317bd7d40db6d9e42000c0aecd7f6292 100644 (file)
@@ -31,6 +31,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
 {
     if (!canvas) return;
 
+    auto opacity = 51;
+
     //Load jpg file from path
     for (int i = 0; i < 5; ++i) {
         auto picture = tvg::Picture::gen();
@@ -41,6 +43,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
         picture->translate(i* 150, i * 150);
         picture->rotate(30 * i);
         picture->size(200, 200);
+        picture->opacity(opacity + opacity * i);
         if (canvas->push(move(picture)) != tvg::Result::Success) return;
     }
 
index d7ad208147ea6ad830860a8fa8aa80c63cfec7d9..1cccf6965f7c3eb2b722c5f28632ab00a8308259 100644 (file)
@@ -32,6 +32,8 @@ void tvgDrawCmds(tvg::Canvas* canvas)
     if (!canvas) return;
 
     //Load png file from path
+    auto opacity = 51;
+
     for (int i = 0; i < 5; ++i) {
         auto picture = tvg::Picture::gen();
         if (picture->load(EXAMPLE_DIR"/test.png") != tvg::Result::Success) {
@@ -41,6 +43,7 @@ void tvgDrawCmds(tvg::Canvas* canvas)
         picture->translate(i* 150, i * 150);
         picture->rotate(30 * i);
         picture->size(200, 200);
+        picture->opacity(opacity + opacity * i);
         if (canvas->push(move(picture)) != tvg::Result::Success) return;
     }