mightstone.services.cardconjurer.models.Group
- pydantic model mightstone.services.cardconjurer.models.Group
A layer composed of a list of other layers (One of the 3 possible layer types)
Show JSON schema
{ "$defs": { "Bound": { "properties": { "x": { "title": "X", "type": "integer" }, "y": { "title": "Y", "type": "integer" }, "width": { "title": "Width", "type": "integer" }, "height": { "title": "Height", "type": "integer" }, "type": { "$ref": "#/$defs/BoundType" }, "horizontal": { "$ref": "#/$defs/HorizontalAlign" }, "vertical": { "$ref": "#/$defs/VerticalAlign" } }, "required": [ "x", "y", "width", "height", "type", "horizontal", "vertical" ], "title": "Bound", "type": "object" }, "BoundType": { "enum": [ "fit", "fill" ], "title": "BoundType", "type": "string" }, "FilterOverlay": { "properties": { "type": { "const": "colorOverlay", "enum": [ "colorOverlay" ], "title": "Type", "type": "string" }, "color": { "format": "color", "title": "Color", "type": "string" } }, "required": [ "type", "color" ], "title": "FilterOverlay", "type": "object" }, "FilterShadow": { "properties": { "type": { "const": "shadow", "enum": [ "shadow" ], "title": "Type", "type": "string" }, "color": { "default": "black", "format": "color", "title": "Color", "type": "string" }, "x": { "title": "X", "type": "integer" }, "y": { "title": "Y", "type": "integer" } }, "required": [ "type", "x", "y" ], "title": "FilterShadow", "type": "object" }, "Group": { "description": "A layer composed of a list of other layers (One of the 3 possible layer types)", "properties": { "type": { "const": "group", "default": "group", "enum": [ "group" ], "title": "Type", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tags" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "children": { "default": [], "items": { "discriminator": { "mapping": { "group": "#/$defs/Group", "image": "#/$defs/Image", "text": "#/$defs/Text" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/Group" }, { "$ref": "#/$defs/Text" }, { "$ref": "#/$defs/Image" } ] }, "title": "Children", "type": "array" } }, "title": "Group", "type": "object" }, "HorizontalAlign": { "enum": [ "left", "right", "center" ], "title": "HorizontalAlign", "type": "string" }, "Image": { "description": "A layer composed of an image (One of the 3 possible layer types)", "properties": { "type": { "const": "image", "enum": [ "image" ], "title": "Type", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tags" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "src": { "title": "Src", "type": "string" }, "x": { "default": 0, "title": "X", "type": "integer" }, "y": { "default": 0, "title": "Y", "type": "integer" }, "z": { "default": 0, "title": "Z", "type": "integer" }, "width": { "default": 100, "title": "Width", "type": "integer" }, "height": { "default": 100, "title": "Height", "type": "integer" }, "thumb": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Thumb" }, "bounds": { "anyOf": [ { "$ref": "#/$defs/Bound" }, { "type": "null" } ], "default": null }, "masks": { "anyOf": [ { "items": { "$ref": "#/$defs/Mask" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Masks" }, "opacity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Opacity" }, "filters": { "anyOf": [ { "items": { "discriminator": { "mapping": { "colorOverlay": "#/$defs/FilterOverlay", "shadow": "#/$defs/FilterShadow" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/$defs/FilterShadow" }, { "$ref": "#/$defs/FilterOverlay" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Filters" } }, "required": [ "type", "src" ], "title": "Image", "type": "object" }, "Mask": { "properties": { "type": { "const": "image", "enum": [ "image" ], "title": "Type", "type": "string" }, "name": { "title": "Name", "type": "string" }, "src": { "title": "Src", "type": "string" } }, "required": [ "type", "name", "src" ], "title": "Mask", "type": "object" }, "Tags": { "description": "Another important note is that many text and image layers have the tags \"editable\",\nand there are two groups tagged \"new-image-group\" and \"new-text-group\". These tags\ntell the UI which layers should be presented as editable, and which layer groups\nshould store newly-added layers.", "enum": [ "editable", "draggable", "new-image-group", "new-text-group", "name" ], "title": "Tags", "type": "string" }, "Text": { "description": "A layer composed of a text (One of the 3 possible layer types)", "properties": { "type": { "const": "text", "enum": [ "text" ], "title": "Type", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" }, "tags": { "anyOf": [ { "items": { "$ref": "#/$defs/Tags" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "text": { "title": "Text", "type": "string" }, "font": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Font" }, "color": { "default": "white", "format": "color", "title": "Color", "type": "string" }, "oneLine": { "default": false, "title": "Oneline", "type": "boolean" }, "align": { "anyOf": [ { "$ref": "#/$defs/HorizontalAlign" }, { "type": "null" } ], "default": "left" }, "verticalAlign": { "anyOf": [ { "$ref": "#/$defs/VerticalAlign" }, { "type": "null" } ], "default": "center" }, "lineHeightScale": { "default": 1, "title": "Lineheightscale", "type": "number" }, "fontWeight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Fontweight" }, "rotation": { "default": 0, "title": "Rotation", "type": "integer" }, "size": { "title": "Size", "type": "integer" }, "opacity": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Opacity" }, "x": { "title": "X", "type": "integer" }, "y": { "title": "Y", "type": "integer" }, "width": { "title": "Width", "type": "integer" }, "height": { "title": "Height", "type": "integer" }, "textCodesOnly": { "default": false, "title": "Textcodesonly", "type": "boolean" }, "filters": { "anyOf": [ { "items": { "anyOf": [ { "$ref": "#/$defs/FilterShadow" }, { "$ref": "#/$defs/FilterOverlay" } ] }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Filters" } }, "required": [ "type", "text", "size", "x", "y", "width", "height" ], "title": "Text", "type": "object" }, "VerticalAlign": { "enum": [ "top", "center", "bottom" ], "title": "VerticalAlign", "type": "string" } }, "allOf": [ { "$ref": "#/$defs/Group" } ] }
- Fields:
- field children: List[AnyLayer] = []
- field type: Literal[LayerTypes.GROUP] = 'group'