User Tools

Site Tools


dragengine:modules:dragonscript:xmlguitheme:canvascreator

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
dragengine:modules:dragonscript:xmlguitheme:canvascreator [2020/04/03 10:21] – url move dragonlorddragengine:modules:dragonscript:xmlguitheme:canvascreator [2024/03/14 16:36] (current) dragonlord
Line 9: Line 9:
 Canvas creators are always based directly or indirectly on a type. This type is the //Canvas Creator Prototype// and defines what instance of //CanvasCreator// is used in the scripts. The choice of prototype affects the appearance of the canvas creator and the configuration possibilities. Canvas creators are always based directly or indirectly on a type. This type is the //Canvas Creator Prototype// and defines what instance of //CanvasCreator// is used in the scripts. The choice of prototype affects the appearance of the canvas creator and the configuration possibilities.
  
-The following prototypes are provided by default by the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] script class:+The following prototypes are provided by default by the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html,CanvasCreators~@# script class:
 ^ Name ^ Script Class ^ Description ^ ^ Name ^ Script Class ^ Description ^
-| [[#default|Default]] | [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] | Empty canvas creator | +| [[#default|Default]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html,DefaultCanvasCreator~@# | Empty canvas creator | 
-| [[#rectangle|Rectangle]] | [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] | Filled or empty rectangle | +| [[#rectangle|Rectangle]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html,RectangleCanvasCreator~@# | Filled or empty rectangle | 
-| [[#bevel|Bevel]] | [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] | Filled or empty two-color bevelled border | +| [[#bevel|Bevel]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html,BevelCanvasCreator~@# | Filled or empty two-color bevelled border | 
-| [[#image|Image]] | [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] | Image stretched across entire canvas | +| [[#image|Image]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html,ImageCanvasCreator~@# | Image stretched across entire canvas | 
-| [[#imageborder|ImageBorder]] | [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html|ImageBorderCanvasCreator]] | Up to 9 images creating size adapting border |+| [[#imageborder|ImageBorder]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html,ImageBorderCanvasCreator~@# | Up to 9 images creating size adapting border |
  
-You can use custom prototypes by adding them to [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] instance before loading gui themes. This is useful if you created custom canvas creator subclasses requiring custom parameters.+You can use custom prototypes by adding them to #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html,CanvasCreators~@# instance before loading gui themes. This is useful if you created custom canvas creator subclasses requiring custom parameters.
  
 This example defines a canvas creator based on the //Image// prototype displaying //canvasImage.png// stretched across entire canvas size. This example defines a canvas creator based on the //Image// prototype displaying //canvasImage.png// stretched across entire canvas size.
Line 39: Line 39:
  
 ===== Default ===== ===== Default =====
-The most basic canvas creator creating no canvas creator at all (empty canvas creator). Creates an instance of the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] script class. This is useful to set an empty canvas creator. As such it has no parameters at all.+The most basic canvas creator creating no canvas creator at all (empty canvas creator). Creates an instance of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html,DefaultCanvasCreator~@# script class. This is useful to set an empty canvas creator. As such it has no parameters at all.
  
  
 ===== Rectangle ===== ===== Rectangle =====
-Creates a canvas creator drawing a rectangle with optional fill color. Creates an instance of the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] script class. Both the rectangle and fill color are optional.+Creates a canvas creator drawing a rectangle with optional fill color. Creates an instance of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html,RectangleCanvasCreator~@# script class. Both the rectangle and fill color are optional.
  
 These parameters can be used: These parameters can be used:
Line 53: Line 53:
  
 ===== Bevel ===== ===== Bevel =====
-Creates a canvas creator drawing a bevelled rectangle with optional fill color. Creates an instance of the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] script class. Both the rectangle and fill colors are optional.+Creates a canvas creator drawing a bevelled rectangle with optional fill color. Creates an instance of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html,BevelCanvasCreator~@# script class. Both the rectangle and fill colors are optional.
  
 These parameters can be used: These parameters can be used:
Line 64: Line 64:
  
 ===== Image ===== ===== Image =====
-Creates a canvas creator stretching an image across the entire canvas size. Creates an instance of the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] script class. The image is optional. If not set this is the same as the default canvas creator.+Creates a canvas creator stretching an image across the entire canvas size. Creates an instance of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html,ImageCanvasCreator~@# script class. The image is optional. If not set this is the same as the default canvas creator.
  
 These parameters can be used: These parameters can be used:
Line 73: Line 73:
  
 ===== ImageBorder ===== ===== ImageBorder =====
-Creates a canvas creator using up to 9 images to draw a size adapting border. The set of images composes of a center, side images and corner images. The corner images are placed at their original size in each corner. The side images are stretched along the respective border between the corners. The center is stretched to touch all corners. Creates an instance of the [[https://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html|ImageBorderCanvasCreator]] script class. All images are optional. Make sure the sizes of the images match. For example the top-left corner, top-right corner and top side images should have the same height. Otherwise gaps can result. If the canvas gets too small all images are scaled down to fit. This can be a suboptimal result so try to keep widgets using this canvas creator at a reasonable size.+Creates a canvas creator using up to 9 images to draw a size adapting border. The set of images composes of a center, side images and corner images. The corner images are placed at their original size in each corner. The side images are stretched along the respective border between the corners. The center is stretched to touch all corners. Creates an instance of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html,ImageBorderCanvasCreator~@# script class. All images are optional. Make sure the sizes of the images match. For example the top-left corner, top-right corner and top side images should have the same height. Otherwise gaps can result. If the canvas gets too small all images are scaled down to fit. This can be a suboptimal result so try to keep widgets using this canvas creator at a reasonable size.
  
 These parameters can be used: These parameters can be used:
dragengine/modules/dragonscript/xmlguitheme/canvascreator.txt · Last modified: 2024/03/14 16:36 by dragonlord