| René Nyffenegger's collection of things on the web | |
|
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Rotating textfield [Ming wrapper example] | ||
|
This flash movie was created with the following program. TextFieldRotate.cpp
#include "SWFMovie.h"
int main() {
Movie movie ("TextFieldRotate.swf", 400, 400, 15, 7);
TextField text(Font("Verdana.fdb"), 14, 100, 100, "text field", 0x40, 0x60, 0x80, 0xff);
Text text_st(Font("Verdana.fdb"), 14, 100, 100, "static text", 0x40, 0x60, 0x80, 0xff);
text.ReadOnly(true);
DisplayItem iText= movie.Add(text);
iText.MoveTo(200, 200);
// TextField's cannot be rotated, at least it seems so.
// But Text's can!
//iText.Rotate(10);
Shape s;
s.FillStyle(180, 140, 200);
s.Line(20, 0);
s.Line(0, 20);
s.Line(-20, 0);
s.Line(0, -20);
MovieClip mc;
mc.Add(text);
mc.Add(text_st);
mc.Add(s );
mc.NextFrame();
DisplayClip iMC = movie.Add(mc);
iMC.MoveTo(100, 100);
iMC.Rotate(10);
movie.NextFrame();
return 0;
}This is one of a series of examples that demonstrates the C++ ming wrapper classes. Other examples can be found here.
|