function RotaryEncoder() {
this._name = function () {
return "Encoder";
};
this._bounds = function () {
return { x: -15, y: -15, width: 30, height: 30 };
};
this._print = function(g, options) {
g.drawCircle( 10, 0, 1);
g.drawCircle( -10, 0, 1);
g.drawRectangle(- 8, - 6, 15, 12);
// if (options.front) {
// g.drawRectangle(-10, -10, 20, 20);//調整中
// } else {
// }
if (!options.print) {
g.drawRectangle(- 10, - 10, 20, 20);
g.drawCircle(+ 10, 0, 2);
g.drawCircle(- 10, 0, 2);
g.drawText(this._name(), - 10, + 10);
}
};
}