Skip to content

Customizing Essence Language Symbol Stencils

Jinyoung Jang edited this page Nov 11, 2015 · 3 revisions

Look at the file OpenGraph.js

inside the javascript, there are constructors for each symbols and you can find the logics for drawing graphics:

`/**

  • 드로잉할 Shape 을 생성하여 반환한다.

  • @return {OG.geometry.Geometry} Shape 정보

  • @override */ OG.shape.essencia.Alpha.prototype.createShape = function () { var geom1, geomCollection = [];

    if (this.geom) { return this.geom; }

    geom1 = new OG.geometry.Rectangle([0, 0], 90, 100);

    geomCollection.push(geom1); geomCollection.push(new OG.geometry.Line([90, 50], [100, 0])); geomCollection.push(new OG.geometry.Line([90, 50], [100, 100]));

    this.geom = new OG.geometry.GeometryCollection(geomCollection);

    this.geom.style = new OG.geometry.Style({ 'r' : 20, 'label-position': 'center', 'stroke-width' : 2.5 });

    return this.geom; }; `

Clone this wiki locally