diff --git a/charts-demo/src/bin/bar-chart.rs b/charts-demo/src/bin/bar-chart.rs
index ca5e63b..dee5cee 100644
--- a/charts-demo/src/bin/bar-chart.rs
+++ b/charts-demo/src/bin/bar-chart.rs
@@ -3,58 +3,58 @@ use dataflow::*;
 use ux::prelude::*;
 use ux::{ClickAction, Surface, Window};
 
-fn create_stream() -> DataStream<'static, &'static str, i32> {
+fn create_stream() -> DataStream<String, i32> {
     let metadata = vec![
         Channel {
-            name: "Series 1",
+            name: "Series 1".into(),
             tag: 0,
             visible: true,
         },
         Channel {
-            name: "Series 2",
+            name: "Series 2".into(),
             tag: 1,
             visible: true,
         },
         Channel {
-            name: "Series 3",
+            name: "Series 3".into(),
             tag: 2,
             visible: true,
         },
     ];
 
-    let mut frames = vec![DataFrame {
-        metric: "Monday",
+    let mut frames: Vec<DataFrame<String, i32>> = vec![DataFrame {
+        metric: "Monday".into(),
         data: [(0, 1), (1, 3), (2, 5)].iter().cloned().collect(),
     }];
 
     frames.push(DataFrame {
-        metric: "Tuesday",
+        metric: "Tuesday".into(),
         data: [(0, 3), (1, 4), (2, 6)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Wednesday",
+        metric: "Wednesday".into(),
         data: [(0, 4), (1, 3), (2, 1)].iter().cloned().collect(),
     });
 
     // let skip one stream flow
     frames.push(DataFrame {
-        metric: "Thursday",
+        metric: "Thursday".into(),
         data: [(1, 5), (2, 1)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Friday",
+        metric: "Friday".into(),
         data: [(0, 3), (1, 4), (2, 2)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Saturday",
+        metric: "Saturday".into(),
         data: [(0, 5), (1, 10), (2, 4)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Sunday",
+        metric: "Sunday".into(),
         data: [(0, 4), (1, 12), (2, 8)].iter().cloned().collect(),
     });
 
@@ -89,7 +89,7 @@ impl Application {
         options.xaxis.labels.min_rotation = 0;
         options.yaxis.min_value = Some(0);
         options.yaxis.min_interval = Some(2.);
-        options.title.text = Some("Bar Chart Demo");
+        options.title.text = Some("Bar Chart Demo".into());
 
         let mut chart = BarChart::new(options);
 
diff --git a/charts-demo/src/bin/gauge-chart.rs b/charts-demo/src/bin/gauge-chart.rs
index 8593e0d..13233bf 100644
--- a/charts-demo/src/bin/gauge-chart.rs
+++ b/charts-demo/src/bin/gauge-chart.rs
@@ -3,32 +3,32 @@ use dataflow::*;
 use ux::prelude::*;
 use ux::{ClickAction, Surface, Window};
 
-fn create_stream() -> DataStream<'static, &'static str, i32> {
+fn create_stream() -> DataStream<String, i32> {
     let metadata = vec![
         Channel {
-            name: "Browser",
+            name: "Browser".into(),
             tag: 0,
             visible: true,
         },
         Channel {
-            name: "Share",
+            name: "Share".into(),
             tag: 1,
             visible: true,
         },
     ];
 
-    let mut frames = vec![DataFrame {
-        metric: "Memory",
+    let mut frames: Vec<DataFrame<String, i32>> = vec![DataFrame {
+        metric: "Memory".into(),
         data: [(0, 25)].iter().cloned().collect(),
     }];
 
     frames.push(DataFrame {
-        metric: "CPU",
+        metric: "CPU".into(),
         data: [(0, 75)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Disk",
+        metric: "Disk".into(),
         data: [(0, 40)].iter().cloned().collect(),
     });
 
@@ -59,7 +59,7 @@ impl Application {
 
         let mut options: GaugeChartOptions = Default::default();
         options.labels = Some(Default::default());
-        options.title.text = Some("Gauge Chart Demo");
+        options.title.text = Some("Gauge Chart Demo".into());
 
         let mut chart = GaugeChart::new(options);
 
diff --git a/charts-demo/src/bin/line-chart.rs b/charts-demo/src/bin/line-chart.rs
index 381624f..aecc169 100644
--- a/charts-demo/src/bin/line-chart.rs
+++ b/charts-demo/src/bin/line-chart.rs
@@ -3,57 +3,57 @@ use ux::prelude::*;
 use ux::{ClickAction, Surface, Window};
 use charts::{LineChart, LineChartOptions, Chart};
 
-fn create_stream() -> DataStream<'static, &'static str, i32> {
+fn create_stream() -> DataStream<String, i32> {
     let metadata = vec![
         Channel {
-            name: "Series 1",
+            name: "Series 1".into(),
             tag: 0,
             visible: true,
         },
         Channel {
-            name: "Series 2",
+            name: "Series 2".into(),
             tag: 1,
             visible: true,
         },
         Channel {
-            name: "Series 3",
+            name: "Series 3".into(),
             tag: 2,
             visible: true,
         },
     ];
 
-    let mut frames = vec![DataFrame {
-        metric: "Monday",
+    let mut frames: Vec<DataFrame<String, i32>> = vec![DataFrame {
+        metric: "Monday".into(),
         data: [(0, 1), (1, 3), (2, 5)].iter().cloned().collect(),
     }];
 
     frames.push(DataFrame {
-        metric: "Tuesday",
+        metric: "Tuesday".into(),
         data: [(0, 3), (1, 4), (2, 6)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Wednesday",
+        metric: "Wednesday".into(),
         data: [(0, 4), (1, 3), (2, 1)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Thursday",
+        metric: "Thursday".into(),
         data: [(1, 5), (2, 1)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Friday",
+        metric: "Friday".into(),
         data: [(0, 3), (1, 4), (2, 2)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Saturday",
+        metric: "Saturday".into(),
         data: [(0, 5), (1, 10), (2, 4)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Sunday",
+        metric: "Sunday".into(),
         data: [(0, 4), (1, 12), (2, 8)].iter().cloned().collect(),
     });
 
@@ -86,7 +86,7 @@ impl Application {
         options.channel.labels = Some(Default::default());
         options.channel.fill_opacity = 0.25;
         options.yaxis.min_interval = Some(2.);
-        options.title.text = Some("Line Chart Demo");
+        options.title.text = Some("Line Chart Demo".into());
 
         let mut chart = LineChart::new(options);
 
diff --git a/charts-demo/src/bin/pie-chart.rs b/charts-demo/src/bin/pie-chart.rs
index 585fe51..7fcb918 100644
--- a/charts-demo/src/bin/pie-chart.rs
+++ b/charts-demo/src/bin/pie-chart.rs
@@ -3,42 +3,42 @@ use dataflow::*;
 use ux::prelude::*;
 use ux::{ClickAction, Surface, Window};
 
-fn create_stream() -> DataStream<'static, &'static str, i32> {
+fn create_stream() -> DataStream<String, i32> {
     let metadata = vec![
         Channel {
-            name: "Browser",
+            name: "Browser".into(),
             tag: 0,
             visible: true,
         }
     ];
 
-    let mut frames = vec![DataFrame {
-        metric: "Chrome",
+    let mut frames: Vec<DataFrame<String, i32>> = vec![DataFrame {
+        metric: "Chrome".into(),
         data: [(0, 35)].iter().cloned().collect(),
     }];
 
     frames.push(DataFrame {
-        metric: "Firefox",
+        metric: "Firefox".into(),
         data: [(0, 20)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "IE",
+        metric: "IE".into(),
         data: [(0, 30)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Opera",
+        metric: "Opera".into(),
         data: [(0, 5)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Safari",
+        metric: "Safari".into(),
         data: [(0, 8)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Other",
+        metric: "Other".into(),
         data: [(0, 2)].iter().cloned().collect(),
     });
 
@@ -73,7 +73,7 @@ impl Application {
         options.channel.labels.enabled = true;
         options.channel.start_angle = 90. + 10. * 360.;
         options.pie_hole = 0.5;
-        options.title.text = Some("Pie Chart Demo");
+        options.title.text = Some("Pie Chart Demo".into());
 
         let mut chart = PieChart::new(options);
 
diff --git a/charts-demo/src/bin/radar-chart.rs b/charts-demo/src/bin/radar-chart.rs
index e7c194c..dc272af 100644
--- a/charts-demo/src/bin/radar-chart.rs
+++ b/charts-demo/src/bin/radar-chart.rs
@@ -3,52 +3,52 @@ use dataflow::*;
 use ux::prelude::*;
 use ux::{ClickAction, Surface, Window};
 
-fn create_stream() -> DataStream<'static, &'static str, i32> {
+fn create_stream() -> DataStream<String, i32> {
     let metadata = vec![
         Channel {
-            name: "Series 1",
+            name: "Series 1".into(),
             tag: 0,
             visible: true,
         },
         Channel {
-            name: "New Series",
+            name: "New Series".into(),
             tag: 1,
             visible: true,
         },
     ];
 
-    let mut frames = vec![DataFrame {
-        metric: "Monday",
+    let mut frames: Vec<DataFrame<String, i32>> = vec![DataFrame {
+        metric: "Monday".into(),
         data: [(0, 11), (1, 16)].iter().cloned().collect(),
     }];
 
     frames.push(DataFrame {
-        metric: "Tuesday",
+        metric: "Tuesday".into(),
         data: [(0, 19), (1, 15)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Wednesday",
+        metric: "Wednesday".into(),
         data: [(0, 7), (1, 14)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Thursday",
+        metric: "Thursday".into(),
         data: [(0, 17), (1, 12)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Friday",
+        metric: "Friday".into(),
         data: [(0, 17), (1, 10)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Saturday",
+        metric: "Saturday".into(),
         data: [(0, 18), (1, 9)].iter().cloned().collect(),
     });
 
     frames.push(DataFrame {
-        metric: "Sunday",
+        metric: "Sunday".into(),
         data: [(0, 15), (1, 14)].iter().cloned().collect(),
     });
 
@@ -79,7 +79,7 @@ impl Application {
 
         let mut options: RadarChartOptions = Default::default();
         options.channel.labels = Some(Default::default());
-        options.title.text = Some("Radar Chart Demo");
+        options.title.text = Some("Radar Chart Demo".into());
 
         let mut chart = RadarChart::new(options);
 
diff --git a/rough/.gitignore b/rough/.gitignore
new file mode 100644
index 0000000..088ba6b
--- /dev/null
+++ b/rough/.gitignore
@@ -0,0 +1,10 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+
+# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
+# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
+Cargo.lock
+
+# These are backup files generated by rustfmt
+**/*.rs.bk
diff --git a/rough/Cargo.toml b/rough/Cargo.toml
new file mode 100644
index 0000000..a43a9a6
--- /dev/null
+++ b/rough/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "rough"
+version = "0.1.0"
+authors = ["Victor Dudochkin <dudochkin.victor@gmail.com>"]
+edition = "2018"
+
+[dependencies]
+ux-framework = "0.1.0"
diff --git a/rough/LICENSE b/rough/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/rough/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/rough/README.md b/rough/README.md
new file mode 100644
index 0000000..6ddb5e0
--- /dev/null
+++ b/rough/README.md
@@ -0,0 +1 @@
+# ux-samples
\ No newline at end of file
diff --git a/rough/src/bin/r01-line.rs b/rough/src/bin/r01-line.rs
new file mode 100644
index 0000000..0ee9e0a
--- /dev/null
+++ b/rough/src/bin/r01-line.rs
@@ -0,0 +1,68 @@
+use ux::{RoughCanvas, RoughConfig, prelude::*};
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Rough lines")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            let config: RoughConfig = Default::default();
+            let ctx = RoughCanvas::new(ctx, config);
+
+            ctx.set_fill_color(color::RED_9);
+            ctx.begin_path();
+            ctx.move_to(10.0, 10.0);
+            ctx.line_to(100.0, 10.0);
+
+            ctx.move_to(10.0, 210.0);
+            ctx.line_to(500.0, 210.0);
+
+            ctx.move_to(10.0, 20.0);
+            ctx.line_to(10.0, 110.0);
+
+            ctx.stroke();
+
+            ctx.set_fill_color(color::BLUE_9);
+            ctx.begin_path();
+            ctx.move_to(10.0, 10.0);
+            ctx.line_to(100.0, 10.0);
+            
+            ctx.move_to(50.0, 30.0);
+            ctx.line_to(200.0, 100.0);
+
+            ctx.set_line_width(5.0);
+            ctx.stroke();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/rough/src/bin/r02-arc.rs b/rough/src/bin/r02-arc.rs
new file mode 100644
index 0000000..c7fb507
--- /dev/null
+++ b/rough/src/bin/r02-arc.rs
@@ -0,0 +1,77 @@
+use std::f64::consts::PI;
+use ux::prelude::*;
+use ux::{RoughCanvas, RoughConfig, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Transparent rectangles")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            let config: RoughConfig = Default::default();
+            let ctx = RoughCanvas::new(ctx, config);
+
+            ctx.set_stroke_color(color::TEAL_9);
+
+            ctx.arc(150.0, 100.0, 90.0, PI, PI * 1.6, false);
+            ctx.arc(150.0, 200.0, 90.0, PI, PI * 1.6, false);
+            ctx.arc(150.0, 200.0, 90.0, 0.0, PI / 2.0, false);
+
+            // ctx.fill();
+
+            // ctx.set_stroke_color(color::RED_9);
+            ctx.stroke();
+            // {
+            // stroke: 'red', strokeWidth: 4,
+            // fill: 'rgba(255,255,0,0.4)', fillStyle: 'solid'
+            // });
+            // rc.arc(350, 300, 200, 180, Math.PI / 2, Math.PI, true, {
+            // stroke: 'blue', strokeWidth: 2,
+            // fill: 'rgba(255,0,255,0.4)'
+            // });
+
+            // canvas.getContext('2d').translate(-210, 0);
+            // rc.arc(350, 300, 200, 180, Math.PI, Math.PI * 1.6, true, {
+            // fill: 'red', fillStyle: 'zigzag',
+            // hachureGap: 10
+            // });
+            // rc.arc(350, 300, 200, 180, 0, Math.PI / 2, true, {
+            // stroke: 'red', strokeWidth: 4,
+            // fill: 'orange', fillStyle: 'dots'
+            // });
+            // rc.arc(350, 300, 200, 180, Math.PI / 2, Math.PI, true, {
+            // stroke: 'blue', strokeWidth: 2,
+            // fill: 'red', fillStyle: 'cross-hatch'
+            // });
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/rough/src/bin/r03-ellipse.rs b/rough/src/bin/r03-ellipse.rs
new file mode 100644
index 0000000..5ee6376
--- /dev/null
+++ b/rough/src/bin/r03-ellipse.rs
@@ -0,0 +1,90 @@
+#![allow(unused_imports)]
+use std::f64::consts::PI;
+use ux::prelude::*;
+use ux::{RoughCanvas, RoughConfig, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Transparent rectangles")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(512.0, 512.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(512.0, 512.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            let config: RoughConfig = Default::default();
+            let ctx = RoughCanvas::new(ctx, config);
+
+            ctx.save();
+            ctx.translate(40.0, (512.0 - 70.0) / 2.0);
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::TEAL_9);
+            ctx.ellipse(10.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.stroke();
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::RED_9);
+            ctx.ellipse(90.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::PINK_9);
+            ctx.ellipse(170.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.fill(); //{ fillStyle: 'solid' });
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::YELLOW_9);
+            ctx.ellipse(250.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.fill(); //{ fillStyle: 'cross-hatch' });
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::INDIGO_9);
+            ctx.ellipse(330.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.fill(); // { fillStyle: 'zigzag', hachureGap: 8 });
+
+            ctx.begin_path();
+            ctx.set_stroke_color(color::ORANGE_9);
+            ctx.ellipse(410.0, 10.0, 70.0, 70.0, 0.0, 0.0, PI * 2.0, false);
+            ctx.fill(); //{ fillStyle: 'dots' });
+
+            ctx.restore();
+
+            // ctx.circle(10, 110 + 40, 80, 0.0, 0.0, PI * 2.0, false);
+            // { roughness: 2 });
+            // ctx.circle(110, 110 + 40, 80, 0.0, 0.0, PI * 2.0, false);
+            // { fill: 'red', stroke: 'blue', hachureAngle: 0, strokeWidth: 3 });
+            // ctx.circle(210, 110 + 40, 80, 0.0, 0.0, PI * 2.0, false);
+            // { fill: 'pink', fillWeight: 3, hachureGap: 8, hachureAngle: 45 });
+
+            // ctx.ellipse(300.0, 350.0, 480.0, 280.0, 0.0, 0.0, PI * 2.0, false);
+            // { fill: 'red', fillStyle: 'dots', hachureGap: 20, hachureAngle: 0, fillWeight: 2 });
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/rough/src/bin/r04-rectangle.rs b/rough/src/bin/r04-rectangle.rs
new file mode 100644
index 0000000..11839bf
--- /dev/null
+++ b/rough/src/bin/r04-rectangle.rs
@@ -0,0 +1,101 @@
+#![allow(unused_imports)]
+use ux::prelude::*;
+use ux::{RoughCanvas, RoughConfig, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Transparent rectangles")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(512.0, 512.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(512.0, 512.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            let config: RoughConfig = Default::default();
+            let ctx = RoughCanvas::new(ctx, config);
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::TEAL_9);
+            ctx.rect(10.0, 10.0, 80.0, 80.0);
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::RED_9);
+            ctx.rect(110.0, 10.0, 80.0, 80.0);
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::GRAPE_9);
+            ctx.rect(210.0, 10.0, 80.0, 80.0); //, { fillStyle: 'solid' });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::GREEN_9);
+            ctx.rect(310.0, 10.0, 80.0, 80.0); //, { fillStyle: 'cross-hatch' });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::ORANGE_9);
+            ctx.rect(410.0, 10.0, 80.0, 80.0); //, { fillStyle: 'dots' });
+            ctx.fill();
+
+            // second row
+            ctx.begin_path();
+            ctx.set_fill_color(color::CYAN_9);
+            ctx.rect(10.0, 110.0, 80.0, 80.0); //, { roughness: 2 });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::INDIGO_9);
+            ctx.rect(110.0, 110.0, 80.0, 80.0); //, { stroke: 'blue', hachureAngle: 0, strokeWidth: 3 });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::PINK_9);
+            ctx.rect(210.0, 110.0, 80.0, 80.0); //, { fillWeight: 5, hachureGap: 10, hachureAngle: 90 });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::VIOLET_9);
+            ctx.rect(310.0, 110.0, 80.0, 80.0); //, { fillStyle: 'zigzag', hachureGap: 8 });
+            ctx.fill();
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::YELLOW_9);
+            ctx.rect(410.0, 110.0, 80.0, 80.0); //, { fillStyle: 'dots' });
+            ctx.fill();
+
+            // Bottom
+            ctx.begin_path();
+            ctx.set_fill_color(color::LIME_9);
+            ctx.rect(10.0, 210.0, 480.0, 280.0); //, { fillStyle: 'dots', hachureGap: 20, fillWeight: 2 });
+            ctx.fill();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/text/.gitignore b/text/.gitignore
new file mode 100644
index 0000000..088ba6b
--- /dev/null
+++ b/text/.gitignore
@@ -0,0 +1,10 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+
+# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
+# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
+Cargo.lock
+
+# These are backup files generated by rustfmt
+**/*.rs.bk
diff --git a/text/Cargo.toml b/text/Cargo.toml
new file mode 100644
index 0000000..f51b871
--- /dev/null
+++ b/text/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "text"
+version = "0.1.0"
+authors = ["Victor Dudochkin <dudochkin.victor@gmail.com>"]
+edition = "2018"
+
+[dependencies]
+ux-framework = "0.1.0"
diff --git a/text/LICENSE b/text/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/text/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/text/README.md b/text/README.md
new file mode 100644
index 0000000..6ddb5e0
--- /dev/null
+++ b/text/README.md
@@ -0,0 +1 @@
+# ux-samples
\ No newline at end of file
diff --git a/text/src/bin/p24-soulmate-text.rs b/text/src/bin/p24-soulmate-text.rs
new file mode 100644
index 0000000..781241d
--- /dev/null
+++ b/text/src/bin/p24-soulmate-text.rs
@@ -0,0 +1,56 @@
+use ux::prelude::*;
+use ux::{TextStyle, TextWeight, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Soulmate")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(512.0, 512.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(512.0, 512.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_font("Roboto", TextStyle::Normal, TextWeight::Bold, 18.0);
+
+            ctx.set_fill_color(color::TEAL_9); // Stroke color
+
+            ctx.fill_text("Most relationships seem so transitory", 20.0, 30.0);
+
+            ctx.fill_text("They're all good but not the permanent one", 20.0, 60.0);
+
+            ctx.fill_text("Who doesn't long for someone to hold", 20.0, 120.0);
+
+            ctx.fill_text("Who knows how to love you without being told", 20.0, 150.0);
+
+            ctx.fill_text("Somebody tell me why I'm on my own", 20.0, 180.0);
+
+            ctx.fill_text("If there's a soulmate for everyone", 20.0, 210.0);
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/text/src/bin/p25-centered-text.rs b/text/src/bin/p25-centered-text.rs
new file mode 100644
index 0000000..da3136d
--- /dev/null
+++ b/text/src/bin/p25-centered-text.rs
@@ -0,0 +1,51 @@
+use ux::prelude::*;
+use ux::{TextStyle, TextWeight, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Centered text")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_font("Roboto", TextStyle::Normal, TextWeight::Bold, 60.0);
+    
+            ctx.set_fill_color(color::TEAL_9); // Stroke color
+    
+            let extents = ctx.measure_text("ZetCode");
+    
+            let x = (width as f64 - extents.width) / 2.0;
+            let y = height as f64 / 2.0;
+            ctx.fill_text("ZetCode", x, y);
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/text/src/bin/p26-shaded-text.rs b/text/src/bin/p26-shaded-text.rs
new file mode 100644
index 0000000..9797d80
--- /dev/null
+++ b/text/src/bin/p26-shaded-text.rs
@@ -0,0 +1,49 @@
+use ux::prelude::*;
+use ux::{TextStyle, TextWeight, Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Shaded text")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_font("Roboto", TextStyle::Normal, TextWeight::Bold, 50.0);
+    
+            ctx.set_fill_color(color::BLACK); // Stroke color
+            ctx.fill_text("ZetCode", 40.0, 60.0);
+    
+            ctx.set_fill_color(color::TEAL_9); // Stroke color
+            ctx.fill_text("ZetCode", 43.0, 63.0);
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
\ No newline at end of file
diff --git a/text/src/bin/p27-text-filled-gradient.rs b/text/src/bin/p27-text-filled-gradient.rs
new file mode 100644
index 0000000..340edc1
--- /dev/null
+++ b/text/src/bin/p27-text-filled-gradient.rs
@@ -0,0 +1,56 @@
+use ux::{ColorStop, prelude::*};
+use ux::{Gradient, GradientType, LinearGradient, Surface, TextStyle, TextWeight, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Text filled with gradient")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(512.0, 512.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(512.0, 512.0);
+
+        app.window.set_child(&surface);
+
+        const HEIGHT: f64 = 90.0;
+
+        let gradient = Gradient::new(GradientType::Linear(LinearGradient::new(
+            0.0,
+            15.0,
+            0.0,
+            HEIGHT * 0.8,
+        )));
+        gradient.add_color_stop(ColorStop::new(0.0, color::TEAL_9));
+        gradient.add_color_stop(ColorStop::new(1.0, color::TEAL_3));
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_font("Roboto", TextStyle::Normal, TextWeight::Bold, HEIGHT);
+
+            ctx.set_fill_gradient(&gradient);
+            ctx.fill_text("ZetCode", 15.0, 80.0);
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
\ No newline at end of file
diff --git a/transformations/.gitignore b/transformations/.gitignore
new file mode 100644
index 0000000..088ba6b
--- /dev/null
+++ b/transformations/.gitignore
@@ -0,0 +1,10 @@
+# Generated by Cargo
+# will have compiled files and executables
+/target/
+
+# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
+# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
+Cargo.lock
+
+# These are backup files generated by rustfmt
+**/*.rs.bk
diff --git a/transformations/Cargo.toml b/transformations/Cargo.toml
new file mode 100644
index 0000000..4f18420
--- /dev/null
+++ b/transformations/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "transformations"
+version = "0.1.0"
+authors = ["Victor Dudochkin <dudochkin.victor@gmail.com>"]
+edition = "2018"
+
+[dependencies]
+ux-framework = "0.1.0"
diff --git a/transformations/LICENSE b/transformations/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/transformations/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/transformations/README.md b/transformations/README.md
new file mode 100644
index 0000000..6ddb5e0
--- /dev/null
+++ b/transformations/README.md
@@ -0,0 +1 @@
+# ux-samples
\ No newline at end of file
diff --git a/transformations/src/bin/p18-translation.rs b/transformations/src/bin/p18-translation.rs
new file mode 100644
index 0000000..9464335
--- /dev/null
+++ b/transformations/src/bin/p18-translation.rs
@@ -0,0 +1,64 @@
+use ux::prelude::*;
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Translation")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.begin_path();
+            ctx.set_fill_color(color::TEAL_9); // Fill color
+            ctx.rect(10.0, 10.0, 30.0, 30.0);
+            ctx.fill();
+
+            ctx.translate(20.0, 20.0);
+            ctx.begin_path();
+            ctx.set_fill_color(color::ORANGE_9); // Fill color
+            ctx.rect(0.0, 0.0, 30.0, 30.0);
+            ctx.fill();
+
+            ctx.translate(30.0, 30.0);
+            ctx.begin_path();
+            ctx.set_fill_color(color::INDIGO_9); // Fill color
+            ctx.rect(0.0, 0.0, 30.0, 30.0);
+            ctx.fill();
+
+            ctx.translate(40.0, 40.0);
+            ctx.begin_path();
+            ctx.set_fill_color(color::PINK_9); // Fill color
+            ctx.rect(0.0, 0.0, 30.0, 30.0);
+            ctx.fill();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/transformations/src/bin/p19-shear.rs b/transformations/src/bin/p19-shear.rs
new file mode 100644
index 0000000..6240e89
--- /dev/null
+++ b/transformations/src/bin/p19-shear.rs
@@ -0,0 +1,51 @@
+use ux::prelude::*;
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Shear")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_fill_color(color::TEAL_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(20.0, 30.0, 80.0, 50.0);
+            ctx.fill();
+        
+            ctx.transform(1.0, 0.5, 0.0, 1.0, 0.0, 0.0);
+            ctx.begin_path();
+            ctx.rect(130.0, 30.0, 80.0, 50.0);
+            ctx.fill();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/transformations/src/bin/p20-scaling.rs b/transformations/src/bin/p20-scaling.rs
new file mode 100644
index 0000000..5c6b765
--- /dev/null
+++ b/transformations/src/bin/p20-scaling.rs
@@ -0,0 +1,58 @@
+use ux::prelude::*;
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Scaling")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_fill_color(color::TEAL_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(10.0, 10.0, 90.0, 90.0);
+            ctx.fill();
+    
+            ctx.scale(0.6, 0.6);
+            ctx.set_fill_color(color::ORANGE_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(30.0, 30.0, 90.0, 90.0);
+            ctx.fill();
+    
+            ctx.scale(0.8, 0.8);
+            ctx.set_fill_color(color::INDIGO_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(50.0, 50.0, 90.0, 90.0);
+            ctx.fill();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/transformations/src/bin/p21-isolating.rs b/transformations/src/bin/p21-isolating.rs
new file mode 100644
index 0000000..76efb05
--- /dev/null
+++ b/transformations/src/bin/p21-isolating.rs
@@ -0,0 +1,62 @@
+use ux::prelude::*;
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Isolating transformations")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_fill_color(color::TEAL_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(10.0, 10.0, 90.0, 90.0);
+            ctx.fill();
+    
+            ctx.save();
+            ctx.scale(0.6, 0.6);
+            ctx.set_fill_color(color::INDIGO_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(30.0, 30.0, 90.0, 90.0);
+            ctx.fill();
+            ctx.restore();
+    
+            ctx.save();
+            ctx.scale(0.8, 0.8);
+            ctx.set_fill_color(color::ORANGE_9); // Fill color
+            ctx.begin_path();
+            ctx.rect(50.0, 50.0, 90.0, 90.0);
+            ctx.fill();
+            ctx.restore();
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
\ No newline at end of file
diff --git a/transformations/src/bin/p22-donut.rs b/transformations/src/bin/p22-donut.rs
new file mode 100644
index 0000000..3f0d0d4
--- /dev/null
+++ b/transformations/src/bin/p22-donut.rs
@@ -0,0 +1,58 @@
+use std::f64::consts::PI;
+use ux::prelude::*;
+use ux::{Surface, Window};
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Donut")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        let surface = Surface::new();
+        surface.set_size(400.0, 400.0);
+
+        // we should also change surface content size to avoid distortion
+        surface.set_content_size(400.0, 400.0);
+        surface.set_position(56.0, 56.0);
+
+        app.window.set_child(&surface);
+
+        surface.connect_draw(move |_widget, ctx, width, height| {
+            ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+            ctx.set_stroke_color(color::TEAL_9); // Stroke color
+
+            ctx.set_line_width(0.5);
+            ctx.translate(width as f64 / 2.0, height as f64 / 2.0);
+            ctx.arc(0.0, 0.0, 120.0, 0.0, 2.0 * PI, false);
+            ctx.stroke();
+
+            for idx in 0..36 {
+                ctx.save();
+                ctx.rotate(idx as f64 * PI / 36.0);
+                ctx.scale(0.3, 1.0);
+                ctx.arc(0.0, 0.0, 120.0, 0.0, 2.0 * PI, false);
+                ctx.restore();
+                ctx.stroke();
+            }
+
+            false
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
diff --git a/transformations/src/bin/p23-star.rs b/transformations/src/bin/p23-star.rs
new file mode 100644
index 0000000..e0e9bca
--- /dev/null
+++ b/transformations/src/bin/p23-star.rs
@@ -0,0 +1,103 @@
+use std::cell::RefCell;
+use ux::prelude::*;
+use ux::{Point, Surface, Window};
+
+struct Glob {
+    angle: f64,
+    scale: f64,
+    delta: f64,
+}
+
+#[derive(Default, Application)]
+struct Application {
+    window: Window,
+}
+
+impl Application {
+    fn new() -> Self {
+        let app: Self = Default::default();
+        app.window
+            .set_window_size(512, 512)
+            .set_title("UX Framework - Star")
+            .show()
+            .connect_destroy(move |_win| Application::quit());
+
+        app.window.set_background_color(Some(color::GRAY_9));
+
+        app.window.connect_activate(move |window| {
+
+            let points = vec![
+                Point::new(0.0, 85.0),
+                Point::new(75.0, 75.0),
+                Point::new(100.0, 10.0),
+                Point::new(125.0, 75.0),
+                Point::new(200.0, 85.0),
+                Point::new(150.0, 125.0),
+                Point::new(160.0, 190.0),
+                Point::new(100.0, 150.0),
+                Point::new(40.0, 190.0),
+                Point::new(50.0, 125.0),
+                Point::new(0.0, 85.0),
+            ];
+    
+            let glob = RefCell::new(Glob {
+                angle: 0.0,
+                scale: 1.0,
+                delta: 0.01,
+            });
+
+            let surface = Surface::new();
+            surface.set_size(512.0, 512.0);
+
+            // we should also change surface content size to avoid distortion
+            surface.set_content_size(512.0, 512.0);
+
+            window.set_child(&surface);
+            
+            surface.connect_draw(move |_widget, ctx, width, height| {
+                ctx.clear_rect(0.0, 0.0, width as f64, height as f64);
+
+                let mut state = glob.borrow_mut();
+
+                ctx.set_fill_color(color::TEAL_9);
+                ctx.set_line_width(1.0);
+
+                ctx.translate(width as f64 / 2.0, height as f64 / 2.0);
+                ctx.rotate(state.angle);
+                ctx.scale(state.scale, state.scale);
+
+                for point in points.iter() {
+                    ctx.line_to(point.x, point.y);
+                }
+
+                ctx.close_path();
+                ctx.fill();
+                ctx.stroke();
+
+                if state.scale < 0.01 {
+                    state.delta = -state.delta;
+                } else if state.scale > 0.99 {
+                    state.delta = -state.delta;
+                }
+
+                state.scale += state.delta;
+                state.angle += 0.01;
+
+                false
+            });
+
+            ux::interval(10, move || {
+                surface.invalidate();
+
+                Continue(true)
+            });
+
+        });
+
+        app
+    }
+}
+
+fn main() {
+    Application::run();
+}
