Canvas view camera element: Difference between revisions
Jump to navigation
Jump to search
(→C++ =) |
|||
Line 19: | Line 19: | ||
## | ## | ||
# | # instantiate a new element | ||
m.myElement = m.root.createChild( ELEMENT_NAME ); | m.myElement = m.root.createChild( ELEMENT_NAME ); | ||
Line 31: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Related == | == Related == | ||
{{Appendix}} | {{Appendix}} |
Revision as of 09:23, 27 August 2017
This article is a stub. You can help the wiki by expanding it. |
C++
Base Package
var ELEMENT_NAME ="view-camera"; # to be adapted according to the C++ changes
var myElementTest = {
##
# constructor
new: func(x=640,y=480) {
var m = { parents: [myElementTest] };
m.dlg = canvas.Window.new([x,y],"dialog");
m.canvas = m.dlg.createCanvas().setColorBackground(1,1,1,1);
m.root = m.canvas.createGroup();
##
# instantiate a new element
m.myElement = m.root.createChild( ELEMENT_NAME );
m.init();
return m;
}, # new
}; # end of myElementTest
var test = myElementTest.new();
Related
References
|