DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

0.1.3 Text #18

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 5 years ago

Priority: Unset

Depends:

0.0 Master (OO)-[OO.class.js] => 0.1 Point (OoPoint)-[OoPoint.class.js] => 0.1.1 Region (OoRegion)-[OoPointRegion.class.js]

0.2 Color (OoColor)-[OoColor.class.js]

UML

OoText-02-11-2019

Description:

Used to define a region of the GUI in which text will be rendered This is a text object and only uses fixedsys front As OoText inherits OoPointRegion and all its properties, OoText has options for border and background colors. Building on the region model by adding objTextColor and numCharacterSquare properties control the appearance of text within the region. A string property strValue is used to store text that will be made visible to users along with it's containing region when funRender method is called. Although text size can be controlled manually with numCharacterSquare, booScaleText controls how to control given texts that will not fit with in their region. If true numCharacterSquare is reduced to a calculated scale allowing a full string to be displayed in the region. When false a string is cut to length. Multiline is automatic based on region dimensions and character square.

Properties:

strValue - protected String, contains text to display inside this region once rendered.
booScaleText - protected boolean, true = scale text to region. False = cut to length.
numCharacterSquare - protected number, square pixels per character.
objTextColor - protected OoColor, color object defining a color for text.

Methods:

funToText() - public function, returns the text value of an instance of the object.
funRender() -  public function, draws a PointRegionText as a visual gui object.
funTextScalingMode() - public function, switches booScaleText to true. numCharacterSquare is reduced to a calculated scale allowing a full string to be displayed in the region. Mutually excludes Text Cutting Mode().
funTextCuttingMode() - public function, switches booScaleText to false, text string is cut to length to fit region. Mutually excludes Text Scaling Mode.
funSetCharacterSquare() - public function, an interface for setting text size. Accepts number parameter numNewCharSquare 
funSetTextValue() - public function, used to set a string of text to display. Accepts strNewTextValue as string parameter.
funSetTextColor - public function, used to set a color to display text in. Accepts objNewColor as OoColor object.
DanielBullimore commented 5 years ago

OoText-19-7-2019 My thinking for OoText Object class so far

DanielBullimore commented 5 years ago

I've added text size and color to initial uml class concept...

DanielBullimore commented 4 years ago

sanity checking finds no set color or set text methods. Also all properties of OoText should be protected with get and set methods. Changes applied UML Updated to match. Sanity check complete.