Glimmr Canvas Editor

version 1/100805 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Changing the line-weight

    Changing the line-weight is an action applying to one number. Understand "line-weight [a number]" or "line weight [a number]" or "bit-size [a number]" or "bit size [a number]" as changing the line-weight.

    Check changing the line-weight:
        if the number understood < 1:
            say "The line-weight must be greater than 0.";

    Carry out changing the line-weight (this is the line-weight changing rule):
        change the current line-weight to the number understood;
        if the number of entries of the element-selection set > 0:
            let count be 0;
            repeat with item running through the element-selection set:
                unless item is a sprite:
                    increase count by 1;
                    if the item is a primitive:
                        change the line-weight of the item to the current line-weight;
                    if the item is a rendered string:
                        change the bit-size of the item to the current line-weight;
                if count is 0:
                    say "Newly drawn elements will be created with a line-weight or bit-size of [the current line-weight]. [bracket]Selected items are not drawn elements and were not affected.[close bracket][line break]";
                otherwise:
                    say "Line-weight changed[if count > 1] for [count] items[end if][if count < the number of entries of the element-selection set]. Some elements are not drawn elements and were not affected[end if].";
        otherwise:
            say "Newly drawn elements will be created with a line-weight or bit-size of [the current line-weight].";
        follow the window-drawing rules for the working window;
        follow the window-drawing rules for the drawing-window.