0.3.1
Added:
- BezierLayer
- QuadraticLayer
- Centring options:
- Start Top
- Start Bottom
- Center Top
- Center Bottom
- End Top
- End Bottom
- Debug mode (When turned on, it starts sending a lot of logs)
- Link*
Fixed:
- Incorrect percentage calculation
*A more subliminal explanation:
This function allows you to specify the length and/or height of the MorphLayer as the length/height of a specified text field.
How it works:
//...
new MorphLayer()
.setPosition(50, 475)
.setSize('link-w-punishment-20', 50, 20) // Here we specify that the value of the length of the text field with id “punishment” should be used and increased by 20 pixels.
.setFilled(false)
.setCentring(Centring.Start)
.setStroke(3)
.setColor('#ff8a8a')
.setShadow('#000', 5),
new TextLayer() // and this is our text field with the required id.
.setPosition(60, 475)
.setID('punishment')
.setAlign(TextAlign.Start)
.setBaseline(TextBaseline.Middle)
.setFont('GeistMono', 34, FontWeight.SemiBold)
.setColor('#ff8a8a')
.setText(rule.punishment)
.setShadow('#000', 5)
//...link-w-punishment-20
link-w— Marker indicating that we want to take the length of the text field.punishment— id of our text field20— The value in pixels by which we will increase the length.
Examples:
link-w-someId-0— Here we take the length of the field without increasing it.link-h-someId-100— Here we take the height of the field and increase the final value by 100 pixels.link-h-someId-0— Here we take the height of the field and leave it the same.