Drag[en]gine Script Module DragonScript  1.21
Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator Class Reference

Canvas creator creating a single image bordered by 8 border images canvas. More...

Inheritance diagram for Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator:
Dragengine.Gui.CanvasCreators.DefaultCanvasCreator Dragengine.Gui.CanvasCreators.CanvasCreator

Public Member Functions

BorderSize borderSize ()
 Calculate size of border elements. More...
 
CanvasCreator copyCanvasCreator ()
 Create copy of canvas creator. More...
 
Canvas createCanvas (Point size)
 Create canvas for a specific widget size. More...
 
ColorMatrix getColorMatrix ()
 Color matrix to use for created canvas or null to use none. More...
 
Image getImageAttachBottom ()
 Bottom attach image. More...
 
Image getImageAttachLeft ()
 Left attach image. More...
 
Image getImageAttachRight ()
 Right attach image. More...
 
Image getImageAttachTop ()
 Top attach image. More...
 
Image getImageCenter ()
 Center image. More...
 
Image getImageCornerBottomLeft ()
 Bottom left corner image. More...
 
Image getImageCornerBottomRight ()
 Bottom right corner image. More...
 
Image getImageCornerTopLeft ()
 Top left corner image. More...
 
Image getImageCornerTopRight ()
 Top right corner image. More...
 
Image getImageSideBottom ()
 Bottom side image. More...
 
Image getImageSideLeft ()
 Left side image. More...
 
Image getImageSideRight ()
 Right side image. More...
 
Image getImageSideTop ()
 Top side image. More...
 
ImageBorderCanvasCreator new ()
 Create canvas creator. More...
 
ImageBorderCanvasCreator new (ImageBorderCanvasCreator creator)
 Create copy of canvas creator. More...
 
void setColorMatrix (ColorMatrix colorMatrix)
 Set color matrix to use for created canvas or null to use none. More...
 
void setImageAttachBottom (Image image)
 Set bottom attach image. More...
 
void setImageAttachLeft (Image image)
 Set left attach image. More...
 
void setImageAttachRight (Image image)
 Set right attach image. More...
 
void setImageAttachTop (Image image)
 Set top attach image. More...
 
void setImageCenter (Image image)
 Set center image. More...
 
void setImageCornerBottomLeft (Image image)
 Set bottom left corner image. More...
 
void setImageCornerBottomRight (Image image)
 Set bottom right corner image. More...
 
void setImageCornerTopLeft (Image image)
 Set top left corner image. More...
 
void setImageCornerTopRight (Image image)
 Set top right corner image. More...
 
void setImageSideBottom (Image image)
 Set bottom side image. More...
 
void setImageSideLeft (Image image)
 Set left side image. More...
 
void setImageSideRight (Image image)
 Set right side image. More...
 
void setImageSideTop (Image image)
 Set top side image. More...
 
void setParameter (String name, Object value)
 Set parameter. More...
 
- Public Member Functions inherited from Dragengine.Gui.CanvasCreators.DefaultCanvasCreator
DefaultCanvasCreator new (DefaultCanvasCreator creator)
 Create copy of canvas creator. More...
 

Protected Member Functions

void addImageCanvas (CanvasView content, Image image, int x, int y, int width, int height)
 Convenience method to create and add image canvas. More...
 

Detailed Description

Canvas creator creating a single image bordered by 8 border images canvas.

Creates an image canvas with an image stretched to fit the entire widget with 4 corner and 4 side canvas image located around it. Optionally up to 4 attach images can be used to add non-stretching middle sections to sides. Think of of a cartoon speech bubble. The section pointing down at the speaking actor would be an attach image.

Stores up to 13 images:

  • corner top left
  • corner top right
  • corner bottom left
  • corner bottom right
  • side left
  • side top
  • side right
  • side bottom
  • center
  • attach left
  • attach top
  • attach right
  • attach bottom

create a canvas view with size and up to 13 image canvas added to it in the appropriate location. corners and attaches are all fixed size. sides are stretched to touch the respective corners. center is stretched to touch all sides. if any image is null it is not used and assumed to have 0 size.

Member Function Documentation

◆ addImageCanvas()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.addImageCanvas ( CanvasView  content,
Image  image,
int  x,
int  y,
int  width,
int  height 
)
protected

Convenience method to create and add image canvas.

◆ borderSize()

BorderSize Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.borderSize ( )

Calculate size of border elements.

Returns the minimum and maximum width and height of side and corner images if existing for the appropriate border side.

◆ copyCanvasCreator()

CanvasCreator Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.copyCanvasCreator ( )

Create copy of canvas creator.

Reimplemented from Dragengine.Gui.CanvasCreators.DefaultCanvasCreator.

◆ createCanvas()

Canvas Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.createCanvas ( Point  size)

Create canvas for a specific widget size.

Reimplemented from Dragengine.Gui.CanvasCreators.DefaultCanvasCreator.

◆ getColorMatrix()

ColorMatrix Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getColorMatrix ( )

Color matrix to use for created canvas or null to use none.

◆ getImageAttachBottom()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageAttachBottom ( )

Bottom attach image.

◆ getImageAttachLeft()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageAttachLeft ( )

Left attach image.

◆ getImageAttachRight()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageAttachRight ( )

Right attach image.

◆ getImageAttachTop()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageAttachTop ( )

Top attach image.

◆ getImageCenter()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageCenter ( )

Center image.

◆ getImageCornerBottomLeft()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageCornerBottomLeft ( )

Bottom left corner image.

◆ getImageCornerBottomRight()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageCornerBottomRight ( )

Bottom right corner image.

◆ getImageCornerTopLeft()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageCornerTopLeft ( )

Top left corner image.

◆ getImageCornerTopRight()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageCornerTopRight ( )

Top right corner image.

◆ getImageSideBottom()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageSideBottom ( )

Bottom side image.

◆ getImageSideLeft()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageSideLeft ( )

Left side image.

◆ getImageSideRight()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageSideRight ( )

Right side image.

◆ getImageSideTop()

Image Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.getImageSideTop ( )

Top side image.

◆ new() [1/2]

ImageBorderCanvasCreator Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.new ( )

Create canvas creator.

Reimplemented from Dragengine.Gui.CanvasCreators.DefaultCanvasCreator.

◆ new() [2/2]

ImageBorderCanvasCreator Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.new ( ImageBorderCanvasCreator  creator)

Create copy of canvas creator.

◆ setColorMatrix()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setColorMatrix ( ColorMatrix  colorMatrix)

Set color matrix to use for created canvas or null to use none.

◆ setImageAttachBottom()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageAttachBottom ( Image  image)

Set bottom attach image.

◆ setImageAttachLeft()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageAttachLeft ( Image  image)

Set left attach image.

◆ setImageAttachRight()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageAttachRight ( Image  image)

Set right attach image.

◆ setImageAttachTop()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageAttachTop ( Image  image)

Set top attach image.

◆ setImageCenter()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageCenter ( Image  image)

Set center image.

◆ setImageCornerBottomLeft()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageCornerBottomLeft ( Image  image)

Set bottom left corner image.

◆ setImageCornerBottomRight()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageCornerBottomRight ( Image  image)

Set bottom right corner image.

◆ setImageCornerTopLeft()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageCornerTopLeft ( Image  image)

Set top left corner image.

◆ setImageCornerTopRight()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageCornerTopRight ( Image  image)

Set top right corner image.

◆ setImageSideBottom()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageSideBottom ( Image  image)

Set bottom side image.

◆ setImageSideLeft()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageSideLeft ( Image  image)

Set left side image.

◆ setImageSideRight()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageSideRight ( Image  image)

Set right side image.

◆ setImageSideTop()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setImageSideTop ( Image  image)

Set top side image.

◆ setParameter()

void Dragengine.Gui.CanvasCreators.ImageBorderCanvasCreator.setParameter ( String  name,
Object  value 
)

Set parameter.

Supported parameters: | name | value | Setter | | center | Image | setImageCenter | | sideLeft | Image | setImageSideLeft | | sideTop | Image | setImageSideTop | | sideBottom | Image | setImageSideBottom | | sideRight | Image | setImageSideRight | | cornerTopLeft | Image | setImageCornerTopLeft | | cornerTopRight | Image | setImageCornerTopRight | | cornerBottomLeft | Image | setImageCornerBottomLeft | | cornerBottomRight | Image | setImageCornerBottomRight | | attachLeft | Image | setImageAttachLeft | | attachTop | Image | setImageAttachTop | | attachBottom | Image | setImageAttachBottom | | attachRight | Image | setImageAttachRight | | colorMatrix | ColorMatrix | setColorMatrix |

Reimplemented from Dragengine.Gui.CanvasCreators.DefaultCanvasCreator.


The documentation for this class was generated from the following file: