Skip to content
Snippets Groups Projects
Commit 3bfe7253 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

example for images in views + double-click commands

parent e26469e8
No related branches found
No related tags found
No related merge requests found
tutorial/image.png

76.4 KiB

......@@ -90,8 +90,18 @@ View "comments" {
// Add a text string in model coordinates at (X,Y,Z) = (0, 0.11, 0):
T3(0, 0.11, 0, 0){ "Hole" };
// If a string starts with `file://', the rest is interpreted as an image
// file, whose size and orientation can be specified after a `@' symbol:
T3(-0.01, 0.09, 0, 0){ "file://image.png@0.02x0" };
T2(195, -7, 0){ "file://image.png@20x0" };
};
// Views and geometrical entities can be made to respond to double-click events:
View[0].DoubleClickedCommand = "Printf('View[0] has been double-clicked!');";
Geometry.DoubleClickedLineCommand = "Printf('Line %g has been double-clicked!',
Geometry.DoubleClickedEntityTag);";
Color Grey50{ Surface{ 22 }; }
Color Purple{ Surface{ 24 }; }
Color Red{ Line{ 1:14 }; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment