User Tools

Site Tools


dragengine:modules:dragonscript:canvascreators

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
dragengine:modules:dragonscript:canvascreators [2020/07/06 09:23]
dragonlord [Canvas Creators (DragonScript Module)]
dragengine:modules:dragonscript:canvascreators [2020/07/06 09:26]
dragonlord [Border Image Canvas Creator]
Line 36: Line 36:
 Each image can be null in which case it is not rendered. The corners are fixed size images occupying the exact pixel size of the respective images. They should line up in size to avoid gaps. The side images are stretched in the respective direction to meet with their neighbor corners. Their size has to match the corner size to prevent gaps. If smaller they are aligned with the inner corner boundaries leaving a gap at the outside. The center image is stretched to touch each corner. This system provides a bordered image scaling well with different sizes. This is the best solution for buttons, panels or other element requiring a border around a stretchable center element. Each image can be null in which case it is not rendered. The corners are fixed size images occupying the exact pixel size of the respective images. They should line up in size to avoid gaps. The side images are stretched in the respective direction to meet with their neighbor corners. Their size has to match the corner size to prevent gaps. If smaller they are aligned with the inner corner boundaries leaving a gap at the outside. The center image is stretched to touch each corner. This system provides a bordered image scaling well with different sizes. This is the best solution for buttons, panels or other element requiring a border around a stretchable center element.
  
 +Example image border using attaches on each side. Other examples would be speech bubbles with one attach where the bubble connects to the actor or sci-fi info panels with an attach pointing to the object to show information for.
 +{{ :dragengine:modules:dragonscript:image_border_with_attaches.png |Example image border using attaches}}
 ====== Canvas Creator Example ====== ====== Canvas Creator Example ======
 This example create a canvas creator to produce buttons. Each time it is called a new button is produced. The same could be done for game elements to produce actor sprites for example. This example create a canvas creator to produce buttons. Each time it is called a new button is produced. The same could be done for game elements to produce actor sprites for example.
dragengine/modules/dragonscript/canvascreators.txt ยท Last modified: 2020/07/06 09:26 by dragonlord