ImageUploadBuilder
A builder for a new ImageUpload.
Reference
constructor
buildImageUpload(file);
Create an image upload builder for the given file.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
file | File | Blob | The image file to upload |
Methods
dpi
dpi(dpi);
Set the grid dpi
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
dpi | number | The dpi of the image grid |
Returns the current builder.
offset
offset(offset);
Set the grid offset
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
offset | Vector2 | The offset of the image grid |
Returns the current builder.
name
name(name);
Set the upload name
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
name | string | The name of the uploaded image. If left blank and a File input is used the file.name property will be used |
Returns the current builder.
description
description(description: string)
Set the items description
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
description | string | The description |
Returns the current builder.
rotation
rotation(rotation);
Set the image rotation
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
rotation | number | The default rotation of the image in degrees |
Returns the current builder.
scale
scale(scale);
Set the image scale
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
scale | Vector2 | The default scale of the image |
Returns the current builder.
locked
locked(locked);
Set the items locked
boolean.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
locked | boolean | The locked setting |
Returns the current builder.
visible
visible(visible);
Set the items visible
boolean.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
visible | boolean | The visible setting |
Returns the current builder.
text
text(text);
Set the images text content
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
text | TextContent | The content of the images text |
Returns the current builder.
textItemType
textItemType(textItemType);
Set the images text item type
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
textItemType | "LABEL" | "TEXT" | The type of the images text |
Returns the current builder.
textWidth
textWidth(width);
Set the image texts width
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
width | TextSize | The text width |
Returns the current builder.
textHeight
textHeight(height);
Set the image texts height
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
height | TextSize | The text height |
Returns the current builder.
richText
richText(richText);
Set the image texts richText
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
richText | RichText | The rich text |
Returns the current builder.
plainText
plainText(plainText);
Set the image texts plainText
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
plainText | string | The plain text |
Returns the current builder.
textType
textType(textType);
Set the image texts textType
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
textType | "PLAIN" | "RICH" | The text type |
Returns the current builder.
textPadding
textPadding(padding);
Set the image text styles padding
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
padding | number | The text padding |
Returns the current builder.
fontFamily
fontFamily(fontFamily);
Set the image text styles fontFamily
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
fontFamily | string | The text font family |
Returns the current builder.
fontSize
fontSize(fontSize);
Set the image text styles fontSize
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
fontSize | number | The text font size |
Returns the current builder.
fontWeight
fontWeight(fontWeight);
Set the image text styles fontWeight
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
fontWeight | number | The text font weight |
Returns the current builder.
textAlign
textAlign(textAlign);
Set the image text styles textAlign
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
textAlign | "LEFT" | "CENTER" | "RIGHT" | The text horizontal alignment |
Returns the current builder.
textAlignVertical
textAlignVertical(textAlignVertical);
Set the image text styles textAlignVertical
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
textAlignVertical | "BOTTOM" | "MIDDLE" | "TOP" | The text vertical alignment |
Returns the current builder.
textFillColor
textFillColor(fillColor);
Set the image text styles fillColor
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
fillColor | string | The texts fill color |
Returns the current builder.
textFillOpacity
textFillOpacity(fillOpacity);
Set the image text styles fillOpacity
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
fillOpacity | number | The texts fill opacity |
Returns the current builder.
textStrokeColor
textStrokeColor(strokeColor);
Set the image text styles strokeColor
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
strokeColor | string | The texts stroke color |
Returns the current builder.
textStrokeOpacity
textStrokeOpacity(strokeOpacity);
Set the image text styles strokeOpacity
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
strokeOpacity | number | The texts stroke opacity |
Returns the current builder.
textStrokeWidth
textStrokeWidth(strokeWidth);
Set the image text styles strokeWidth
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
strokeWidth | number | The texts stroke width |
Returns the current builder.
textLineHeight
textLineHeight(lineHeight);
Set the image text styles lineHeight
.
Parameters
NAME | TYPE | DESCRIPTION |
---|---|---|
lineHeight | number | The texts line height |
Returns the current builder.
build
build();
Returns the final ImageUpload.