Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next

  • Chapter - Modal drawing buttons

    A modal drawing button is a kind of modal button. The display status of a modal drawing button is usually g-active. The display-layer of a modal drawing button is 1. The associated canvas of a modal drawing button is the drawing-canvas.

    Some modal drawing buttons are defined by the Table of Drawing Buttons.

    Table of Drawing Buttons
    sprite  image-ID  origin  active-state  inactive-state  linked replacement-command  
    draw_line_modal  Figure of Draw Line Inactive  {62, 1}  Figure of Draw Line Active  Figure of Draw Line Inactive  "DRAW LINE"  
    draw_rect_modal  Figure of Draw Rect Inactive  {85, 1}  Figure of Draw Rect Active  Figure of Draw Rect Inactive  "DRAW RECTANGLE"  
    draw_box_modal  Figure of Draw Box Inactive  {107, 1}  Figure of Draw Box Active  Figure of Draw Box Inactive  "DRAW BOX"  
    draw_stroked_modal  Figure of Draw Stroked Rect Inactive  {129, 1}  Figure of Draw Stroked Rect Active  Figure of Draw Stroked Rect Inactive  "DRAW STROKED RECTANGLE"  
    draw_bit_text_modal  Figure of Draw Bitmap Text Inactive  {151, 1}  Figure of Draw Bitmap Text Active  Figure of Draw Bitmap Text Inactive  "DRAW BITMAP STRING"  
    draw_img_text_modal  Figure of Draw Image Text Inactive  {173, 1}  Figure of Draw Image Text Active  Figure of Draw Image Text Inactive  "DRAW IMAGE STRING"  
    left_align_modal  Figure of Left Align Inactive  {213, 3}  Figure of Left Align Active  Figure of Left Align Inactive  "ALIGN STRING LEFT"  
    center_align_modal  Figure of Center Align Inactive  {230, 3}  Figure of Center Align Active  Figure of Center Align Inactive  "CENTER STRING"  
    right_align_modal  Figure of Right Align Inactive  {248, 3}  Figure of Right Align Active  Figure of Right Align Inactive  "ALIGN STRING RIGHT"  

    The drawing tools is a list of sprites that varies. The drawing tools are {draw_line_modal, draw_rect_modal, draw_box_modal, draw_stroked_modal, draw_bit_text_modal, draw_img_text_modal}.

    To decide which g-element is the button of (G - a g-primitive):
        if G is line, decide on draw_line_modal;
        if G is rectangle, decide on draw_rect_modal;
        if G is box, decide on draw_box_modal;
        if G is stroked rectangle, decide on draw_stroked_modal;
    To decide which g-element is the button of (G - a g-string):
        if G is bitmap string, decide on draw_bit_text_modal;
        if G is image string, decide on draw_img_text_modal;