Options
All
  • Public
  • Public/Protected
  • All
Menu

Module graphics/DisplayObject

Type aliases

A type that represents graphic objects. Used in map's return object's graphics.items array property.

 ...
//we can tell map to render graphics using the graphics property in
//map's return object:
 map(d) {
     return {
         graphics: {
             items: [
                 //Our DisplayObjects go here.
             ]
         }
     }
 }
...

A type that represents the union of all primitive Shape object types. For use in Shapes or ContourShapes DisplayObjects rendered shapes array.

 ...
 {
     graphics: {
         items: [
             {
                 tag: "Shapes",
                 key: "myShapes",
                 primitives: [
                     //Shapes go here.
                 ]
                 fillStyle: {
                     color: '#f00'
                 }
             }
         ]
     }
 }
 ...
TextAlignmentEnum: "none" | "centerAbove" | "centerMiddle" | "centerBelow" | "leftAbove" | "leftMiddle" | "leftBelow" | "rightAbove" | "rightMiddle" | "rightBelow"

Type union over all valid text alignment strings.

TransformOp: Translate | ZIndex

Type union over Translate and ZIndex. Used to describe a transformation operation on a Container DisplayObject.

 type Translate {
     readonly tag: 'Translate';
     readonly vector: Vector2;
 }
 type ZIndex {
     readonly tag: 'ZIndex';
     readonly zIndex: number;
 }

Generated using TypeDoc