Edit the module

This page allows you to edit the existing module (Grove RGBバックライト液晶モジュール).

Basic Information

Provide basic information of the module.

* Photo URLs that end with any one of .jpg, .jpeg, .png or that are uploaded to the Gyazo web service in the PNG format (e.g.https://gyazo.com/hogehoge) are supported.

Relevant URLs

Relevant URLs can be edited in the module page.

Card preview
Grove RGBバックライト液晶モジュール
'16/4/5 16:45
Groveシステムのバックライト色を変えられる液晶モジュールです。

Layout information

Provide the source code of the module layout in JavaScript.

function Jhd1313m1() { this._name = function() { return "RGB Backlight LCD"; }; this._bounds = function () { return { x: -40, y: -20, width: 80, height: 40 }; }; this._print = function(g, options) { g.drawCircle(- 40, - 10, 1); g.drawCircle(+ 40, + 10, 1); g.drawCircle(- 10, - 20, 1); g.drawCircle(+ 30, - 20, 1); g.drawCircle(- 30, + 20, 1); g.drawCircle(+ 10, + 20, 1); g.drawRectangle(- 37.5, - 16, 71.5, 25); if (options.front) { g.drawRectangle(-37.5, 9, 10, 11); } else { } if (!options.print) { g.drawRectangle(- 40, - 20, 80, 40); g.drawCircle(- 40, - 10, 2); g.drawCircle(+ 40, + 10, 2); g.drawCircle(- 10, - 20, 2); g.drawCircle(+ 30, - 20, 2); g.drawCircle(- 30, + 20, 2); g.drawCircle(+ 10, + 20, 2); g.drawText(this._name(), - 37.5, + 20); } }; }
Layout
How to write code
  • First, define a function that represents this module.
  • Define methods _name, _bounds, _print within the class, where ...
  • _name method returns the name of the module for display.
  • _bounds method returns the bounding box of the module as a Rectangle instance.
  • _print method takes graphics context Graphics and printing options PrintOptions as its arguments.
More details can be found at the howto page.
Delete