Skip to content

Instantly share code, notes, and snippets.

@vicolachips44
Created November 2, 2013 11:23
Show Gist options
  • Save vicolachips44/7277910 to your computer and use it in GitHub Desktop.
Save vicolachips44/7277910 to your computer and use it in GitHub Desktop.
haxe based sipnets
package com;
import flash.display.Shape;
import format.SVG;
import org.decatime.ui.component.BaseContainer;
import org.decatime.ui.layout.*;
class Testin extends BaseContainer {
private var svg:SVG;
private var shape:Shape;
private var stra: String = '<path d="M 19.241261,30.758938 15.588917,30.758938 15.588917,28.434719 C 15.26338,28.656075 14.820672,28.968575 14.260792,29.372219 13.713902,29.762845 13.180048,30.075345 12.65923,30.309719 12.047237,30.609198 11.344113,30.856594 10.549855,31.051907 9.7555726,31.260239 8.824584,31.364406 7.7568858,31.364407 5.7907328,31.364406 4.1240678,30.713365 2.7568858,29.411282 1.3896956,28.109201 0.70610249,26.449046 0.70610452,24.430813 0.70610249,22.777175 1.0576646,21.442541 1.760792,20.426907 2.476934,19.398272 3.492558,18.590981 4.807667,18.005032 6.1357846,17.419107 7.730835,17.021972 9.5928233,16.813625 11.45479,16.605306 13.453486,16.449056 15.588917,16.344875 L 15.588917,15.778469 C 15.5889,14.945152 15.439161,14.255048 15.139698,13.708157 14.853224,13.161299 14.436558,12.731612 13.889698,12.419094 13.36885,12.119634 12.743851,11.917811 12.014698,11.813625 11.285519,11.709478 10.523801,11.657394 9.729542,11.657375 8.7659903,11.657394 7.6917726,11.787603 6.5068858,12.048 5.3219833,12.295415 4.0980262,12.659998 2.8350108,13.14175 L 2.6396983,13.14175 2.6396983,9.4112816 C 3.3558394,9.2159906 4.3909946,9.0011471 5.745167,8.7667503 7.0993253,8.5323976 8.4339593,8.4152102 9.7490733,8.4151878 11.285519,8.4152102 12.620153,8.5454184 13.75298,8.8058128 14.898797,9.0532304 15.888379,9.4829174 16.72173,10.094875 17.542023,10.693854 18.167023,11.468593 18.59673,12.419094 19.026397,13.369632 19.24124,14.548017 19.241261,15.95425 L 19.241261,30.758938 M 15.588917,25.387844 15.588917,19.313625 C 14.46911,19.378741 13.147496,19.476397 11.624073,19.606594 10.113645,19.736813 8.9157297,19.925615 8.0303233,20.173 6.9756275,20.47249 6.1227637,20.941239 5.4717295,21.57925 4.8206817,22.204259 4.4951612,23.070143 4.495167,24.176907 4.4951612,25.426912 4.872765,26.370921 5.6279795,27.008938 6.3831801,27.633941 7.5355227,27.946441 9.0850108,27.946438 10.374062,27.946441 11.552446,27.699045 12.620167,27.20425 13.68786,26.696442 14.677443,26.090974 15.588917,25.387844" id="a"/>';
private var strb: String = '<path d="M 21.487355,19.684719 C 21.487332,21.507645 21.226915,23.148268 20.706105,24.606594 20.19827,26.064932 19.508167,27.288889 18.635792,28.278469 17.711294,29.307116 16.69567,30.081855 15.588917,30.602688 14.48213,31.1105 13.264684,31.364406 11.936573,31.364407 10.699582,31.364406 9.618854,31.214667 8.6943858,30.915188 7.7698975,30.62873 6.8584401,30.238105 5.9600108,29.743313 L 5.7256358,30.758938 2.2881358,30.758938 2.2881358,0.36831284 5.9600108,0.36831284 5.9600108,11.227688 C 6.9886483,10.381354 8.0823972,9.6912506 9.2412608,9.1573753 10.400103,8.6105225 11.702185,8.3370853 13.147511,8.3370628 15.725619,8.3370853 17.756867,9.3266676 19.241261,11.305813 20.738635,13.284997 21.487332,16.077963 21.487355,19.684719 M 17.698292,19.782375 C 17.698273,17.178222 17.268586,15.205568 16.40923,13.864407 15.549838,12.510258 14.16312,11.833176 12.249073,11.833157 11.181352,11.833176 10.100624,12.06755 9.0068858,12.536282 7.9131265,12.992029 6.8975025,13.584476 5.9600108,14.313625 L 5.9600108,26.813625 C 7.0016691,27.282379 7.8935953,27.607899 8.635792,27.790188 9.3909896,27.972482 10.243853,28.063628 11.194386,28.063625 13.225621,28.063628 14.814161,27.399566 15.960011,26.071438 17.118846,24.730298 17.698273,22.633946 17.698292,19.782375" id="b" />';
private var strc: String = '<path d="M 18.420948,29.39175 C 17.196971,29.977689 16.031608,30.433417 14.924855,30.758938 13.831089,31.084458 12.665726,31.247219 11.428761,31.247219 9.8532288,31.247219 8.4079177,31.019354 7.0928233,30.563625 5.777712,30.094876 4.651411,29.391752 3.713917,28.45425 2.7633921,27.516754 2.0277157,26.331859 1.5068858,24.899563 0.98605012,23.467278 0.72563372,21.794103 0.72563577,19.880032 0.72563372,16.312338 1.7021952,13.512861 3.6553233,11.481594 5.6214622,9.4503654 8.2126054,8.4347414 11.428761,8.4347191 12.678747,8.4347414 13.902704,8.6105225 15.100636,8.9620628 16.311556,9.3136468 17.418325,9.7433339 18.420948,10.251125 L 18.420948,14.333157 18.225636,14.333157 C 17.105826,13.460778 15.946973,12.790206 14.749073,12.321438 13.564163,11.852707 12.40531,11.618332 11.272511,11.618313 9.1891669,11.618332 7.5420331,12.321456 6.3311045,13.727688 5.1331814,15.120933 4.5342237,17.171712 4.5342295,19.880032 4.5342237,22.510248 5.1201606,24.534986 6.292042,25.95425 7.476929,27.360504 9.1370836,28.063628 11.272511,28.063625 12.014685,28.063628 12.769893,27.965972 13.538136,27.770657 14.306349,27.575347 14.996453,27.321441 15.608448,27.008938 16.142285,26.735504 16.643587,26.449046 17.112355,26.149563 17.581086,25.837068 17.952179,25.570141 18.225636,25.348782 L 18.420948,25.348782 18.420948,29.39175" id="c" />';
private var strd: String = '<path d="M 19.983448,30.758938 16.311573,30.758938 16.311573,28.473782 C 15.256869,29.385241 14.15661,30.094876 13.010792,30.602688 11.864945,31.1105 10.621457,31.364406 9.2803233,31.364407 6.6761486,31.364406 4.6058382,30.361803 3.0693858,28.356594 1.5459454,26.35139 0.78422741,23.571445 0.78422952,20.01675 0.78422741,18.167805 1.0446438,16.520671 1.5654795,15.075344 2.0993303,13.630049 2.8154754,12.399581 3.713917,11.383938 4.5993278,10.394375 5.6279726,9.6391673 6.7998545,9.1183128 7.984741,8.5975017 9.2086981,8.3370853 10.47173,8.3370628 11.61755,8.3370853 12.633174,8.4607831 13.518605,8.7081566 14.404005,8.9425534 15.334994,9.3136468 16.311573,9.8214378 L 16.311573,0.36831284 19.983448,0.36831284 19.983448,30.758938 M 16.311573,25.387844 16.311573,12.868313 C 15.321973,12.425623 14.436558,12.119634 13.655323,11.950344 12.874059,11.781092 12.021195,11.696457 11.09673,11.696438 9.0394275,11.696457 7.4378666,12.412602 6.292042,13.844875 5.1462022,15.277182 4.5732861,17.30843 4.573292,19.938625 4.5732861,22.529779 5.015994,24.502434 5.901417,25.856594 6.7868256,27.197743 8.206095,27.868316 10.15923,27.868313 11.200884,27.868316 12.25557,27.640451 13.323292,27.184719 14.390985,26.715973 15.387077,26.117015 16.311573,25.387844" id="d" />';
private var stre: String = '<path d="M 20.549855,20.231594 4.4756358,20.231594 C 4.47563,21.572749 4.6774527,22.744623 5.0811045,23.747219 5.4847435,24.736808 6.0381284,25.55061 6.7412608,26.188625 7.4183354,26.813629 8.2191158,27.282379 9.1436045,27.594875 10.081093,27.907378 11.109738,28.063628 12.229542,28.063625 13.713902,28.063628 15.204786,27.77066 16.702198,27.184719 18.212595,26.585765 19.286813,25.999828 19.924855,25.426907 L 20.120167,25.426907 20.120167,29.430813 C 18.883168,29.951647 17.620148,30.387844 16.331105,30.739407 15.042026,31.090969 13.68786,31.26675 12.268605,31.26675 8.6488029,31.26675 5.8232849,30.290188 3.792042,28.337063 1.7607889,26.370921 0.74516495,23.584466 0.74516702,19.977688 0.74516495,16.409994 1.7152161,13.577965 3.6553233,11.481594 5.6084413,9.3852613 8.1735429,8.3370853 11.350636,8.3370628 14.293328,8.3370853 16.558951,9.1964594 18.147511,10.915188 19.749052,12.633956 20.549833,15.07536 20.549855,18.239407 L 20.549855,20.231594 M 16.975636,17.419094 C 16.962597,15.492026 16.474316,14.001142 15.510792,12.946438 14.560255,11.891769 13.108434,11.364426 11.155323,11.364407 9.1891669,11.364426 7.6201581,11.943852 6.448292,13.102688 5.2894312,14.261558 4.6318798,15.700359 4.4756358,17.419094 L 16.975636,17.419094" id="e" />';
private var strf: String = '<path d="M 14.026417,3.9230003 13.831105,3.9230003 C 13.427444,3.8058398 12.900101,3.6886524 12.249073,3.5714378 11.598019,3.4412568 11.025103,3.3761527 10.530323,3.3761253 8.9547922,3.3761527 7.80896,3.7277149 7.0928233,4.4308128 6.3896906,5.1209426 6.0381284,6.3774518 6.0381358,8.2003441 L 6.0381358,8.9425316 12.65923,8.9425316 12.65923,12.028469 6.1553233,12.028469 6.1553233,30.758938 2.4834483,30.758938 2.4834483,12.028469 0.00297952,12.028469 0.00297952,8.9425316 2.4834483,8.9425316 2.4834483,8.2198753 C 2.4834445,5.6287546 3.1279751,3.6430795 4.417042,2.2628441 5.7060975,0.86964481 7.5680748,0.17303092 10.00298,0.17300034 10.82328,0.17303092 11.558956,0.21209338 12.210011,0.29018784 12.874059,0.36834323 13.479527,0.45948897 14.026417,0.56362534 L 14.026417,3.9230003" id="f" />';
private var strg: String = '<path d="M 19.983448,28.278469 C 19.983427,31.976385 19.143584,34.691226 17.463917,36.423 15.784212,38.154764 13.19958,39.020648 9.7100108,39.020657 8.5511467,39.020648 7.4183354,38.936013 6.3115733,38.76675 5.2178167,38.610492 4.1370886,38.382628 3.0693858,38.083157 L 3.0693858,34.333157 3.2646983,34.333157 C 3.8636514,34.567528 4.8141713,34.853986 6.1162608,35.192532 7.4183354,35.544089 8.7204174,35.71987 10.022511,35.719875 11.272498,35.71987 12.307653,35.570131 13.12798,35.270657 13.948277,34.971173 14.586297,34.554507 15.042042,34.020657 15.497754,33.512841 15.823275,32.900863 16.018605,32.184719 16.213899,31.468573 16.311556,30.667792 16.311573,29.782375 L 16.311573,27.790188 C 15.204786,28.675607 14.143589,29.339668 13.12798,29.782375 12.125362,30.212063 10.842811,30.426907 9.2803233,30.426907 6.6761486,30.426907 4.6058382,29.489408 3.0693858,27.614407 1.5459454,25.726391 0.78422741,23.070143 0.78422952,19.645657 0.78422741,17.77067 1.0446438,16.156088 1.5654795,14.801907 2.0993303,13.434736 2.8219858,12.256352 3.7334483,11.26675 4.5797965,10.342292 5.6084413,9.6261465 6.8193858,9.1183128 8.0303139,8.5975017 9.2347398,8.3370853 10.432667,8.3370628 11.695675,8.3370853 12.750361,8.4672935 13.59673,8.7276878 14.456089,8.9751055 15.361036,9.3592197 16.311573,9.8800316 L 16.545948,8.9425316 19.983448,8.9425316 19.983448,28.278469 M 16.311573,24.762844 16.311573,12.868313 C 15.334994,12.425623 14.423537,12.113123 13.577198,11.930813 12.743851,11.735519 11.910518,11.637863 11.077198,11.637844 9.0589587,11.637863 7.4704186,12.314946 6.3115733,13.669094 5.1527126,15.023276 4.5732861,16.98942 4.573292,19.567532 4.5732861,22.015457 5.0029732,23.870924 5.8623545,25.133938 6.7217215,26.396963 8.1475013,27.028473 10.139698,27.028469 11.207394,27.028473 12.275101,26.82665 13.342823,26.423 14.423537,26.006338 15.413119,25.452954 16.311573,24.762844" id="g" />';
public function new() {
trace ("constructor call");
super("testin");
}
private override function initializeComponent() {
trace ("initializeComponent begin");
this.container = new VBox(this);
this.container.setVerticalGap(0);
this.container.setHorizontalGap(0);
shape = new Shape();
shape.cacheAsBitmap = true;
this.addChild(shape);
var pos: Int = 0;
svg = new SVG('<svg>' + stra + '</svg>');
svg.render(shape.graphics, pos, 0, 2048, 2048);
pos += 24;
svg = new SVG('<svg>' + strb + '</svg>');
svg.render(shape.graphics, pos);
pos += 24;
svg = new SVG('<svg>' + strc + '</svg>');
svg.render(shape.graphics, pos);
pos += 24;
svg = new SVG('<svg>' + strd + '</svg>');
svg.render(shape.graphics, pos);
pos += 24;
svg = new SVG('<svg>' + stre + '</svg>');
svg.render(shape.graphics, pos);
pos += 24;
svg = new SVG('<svg>' + strf + '</svg>');
svg.render(shape.graphics, pos);
pos += 16;
svg = new SVG('<svg>' + strg + '</svg>');
svg.render(shape.graphics, pos);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment