Connect IQ > APIメモ > Toybox > Graphics

下位ページ

Content

Module: Toybox::Graphics

基本的な描画機能を提供する

The Graphics module provides basic drawing functionality.
  • Since : 1.0.0

Defined Under Namespace

  • Classes : Dc

定数

フォントサイズ

  • FONT_XTINY = 0 : Extra tiny font. Since : 1.0.0
  • FONT_TINY = 1 : Tiny font. Since : 1.0.0
  • FONT_SMALL = 2 : Small font. Since : 1.0.0
  • FONT_MEDIUM = 3 : Medium font. Since : 1.0.0
  • FONT_LARGE = 4 : Large font. Since : 1.0.0
  • FONT_NUMBER_MILD = 5 : Normal size number only font. Since : 1.0.0
  • FONT_NUMBER_MEDIUM = 6 : Medium size number only font. Since : 1.0.0
  • FONT_NUMBER_HOT = 7 : Large size number only font. Since : 1.0.0
  • FONT_NUMBER_THAI_HOT = 8 : Huge size number only font. Since : 1.0.0


FONT Ascent Descent
FONT_XTINY 13 2
FONT_TINY 13 2
FONT_SMALL 13 2
FONT_MEDIUM 18 3
FONT_LARGE 21 5
FONT_NUMBER_MILD 21 3
FONT_NUMBER_MEDIUM 33 3
FONT_NUMBER_HOT 39 4
FONT_NUMBER_THAI_HOT 63 4

  • COLOR_WHITE = 0xFFFFFF : White. Since : 1.0.0
  • COLOR_LT_GRAY = 0xAAAAAA : Light Gray. Since : 1.0.0
  • COLOR_DK_GRAY = 0x555555 : Dark Gray. Since : 1.0.0
  • COLOR_BLACK = 0x000000 : Black. Since : 1.0.0
  • COLOR_RED = 0xFF0000 : Red. Since : 1.0.0
  • COLOR_DK_RED = 0xAA0000 : Dark Red. Since : 1.0.0
  • COLOR_ORANGE = 0xFF5500 : Orange. Since : 1.0.0
  • COLOR_YELLOW = 0xFFAA00 : Yellow. Since : 1.0.0
  • COLOR_GREEN = 0x00FF00 : Green. Since : 1.0.0
  • COLOR_DK_GREEN = 0x00AA00 : Dark Green. Since : 1.0.0
  • COLOR_BLUE = 0x00AAFF : Blue. Since : 1.0.0
  • COLOR_DK_BLUE = 0x0000FF : Dark Blue. Since : 1.0.0
  • COLOR_PURPLE = 0xAA00FF : Purple. Not valid on Fenix 3 or D2 Bravo. Use 0x5500AA instead. Since : 1.0.0
  • COLOR_PINK = 0xFF00FF : Pink. Since : 1.0.0
  • COLOR_TRANSPARENT = -1 : Transparent. Since : 1.0.0

テキスト位置

  • TEXT_JUSTIFY_RIGHT = 0 : Right justify the text at the x/y coordinates. Since : 1.0.0
  • TEXT_JUSTIFY_CENTER = 1 : Center justify the text at the x/y coordinates. Since : 1.0.0
  • TEXT_JUSTIFY_LEFT = 2 : Left justify the text at the x/y coordinates. Since : 1.0.0
  • TEXT_JUSTIFY_VCENTER = 4 : Center the text vertically. Since : 1.0.0

円弧方向

  • ARC_COUNTER_CLOCKWISE = 0 : Counter clockwise draw. Since : 1.2.0
  • ARC_CLOCKWISE = 1 : Clockwise draw. Since : 1.2.0

関数(要約) Graphics

  • (Number) getFontAscent(font) : Gets the recommended distance above the baseline for single spaced text.
  • (Number) getFontDescent(font) : Gets the recommended distance below the baseline for single spaced text.
  • (Number) getFontHeight(font) : Gets the height (ascent plus descent) of the given font.

Instance Method Details

(Number) getFontAscent(font) : Gets the recommended distance above the baseline for single spaced text. The base line is the line on which the text sits.

  • Parameters
    • font (Number) : Font to use
  • Returns (Number) : The ascent of the font
  • Since : 1.2.0

(Number) getFontDescent(font)

Gets the recommended distance below the baseline for single spaced text. The base line is the line on which the text sits.
  • Parameters
    • font (Number) : Font to use
  • Returns : (Number) The descent of the font
  • Since : 1.2.0

(Number) getFontHeight(font)

Gets the height (ascent plus descent) of the given font.
  • Parameters
    • font (Number) : Font to use
  • Returns : (Number) The height of the font
  • Since : 1.2.0
最終更新:2016年03月10日 21:47
添付ファイル