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>
Tue, 16 Nov 2021 08:37:47 +0000 (17:37 +0900)
+ test opacity

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

index 7f4e6c5..0dc6d35 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 d7ad208..1cccf69 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;
     }