Commit 864116f0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Web: Merged FlowDraw/GlowDraw/PlowDraw.

parent 877cd1a5
class GlowDraw {
ctx: GrowCtx;
class Draw {
ctx;
canvas: HTMLCanvasElement;
gctx: CanvasRenderingContext2D;
offset_top: number;
......@@ -18,219 +18,129 @@ class GlowDraw {
this.gctx.save();
}
rect(x, y, width, height, gc_type, idx, highlight) {
private drawTypeToColor(draw_type) {
//console.log("CustomColor cnt", this.customcolors_cnt);
let rgb = GlowColor.rgb_color(draw_type, this.get_customcolors());
return "rgb(" + Math.floor(255 * rgb.r) + "," + Math.floor(255 * rgb.g) +
"," + Math.floor(255 * rgb.b) + ")";
}
private setupGCtx(draw_type, idx) {
this.gctx.lineWidth = idx + 1;
this.gctx.strokeStyle = this.getColor(gc_type);
this.gctx.strokeRect(x, y, width, height);
this.gctx.fillStyle = this.drawTypeToColor(draw_type);
this.gctx.strokeStyle = this.gctx.fillStyle;
}
fill_rect(x, y, width, height, gc_type) {
this.gctx.fillStyle = this.getColor(gc_type);
this.gctx.fillRect(x, y, width, height);
rect(x, y, width, height, draw_type, fill: boolean, idx, highlight = 0) {
this.setupGCtx(draw_type, idx);
if (fill) {
this.gctx.fillRect(x, y, width, height);
} else {
this.gctx.strokeRect(x, y, width, height);
}
}
line(x1, y1, x2, y2, gc_type, idx, highlight) {
this.gctx.strokeStyle = this.getColor(gc_type);
this.gctx.lineWidth = idx + 1;
arc(x, y, width, height, a1, a2, draw_type, fill: boolean, idx, highlight = 0) {
this.setupGCtx(draw_type, idx);
this.gctx.beginPath();
this.gctx.moveTo(x1, y1);
this.gctx.lineTo(x2, y2);
this.gctx.stroke();
if (a2 !== 360) {
this.gctx.moveTo(x + width / 2, y + height / 2);
}
if (typeof this.gctx.ellipse === 'function') {
this.gctx.ellipse(x + width / 2, y + height / 2, width / 2, height / 2,
0, -a1 * Math.PI / 180, -(a1 + a2) * Math.PI / 180, true);
} else {
this.gctx.arc(x + width / 2, y + height / 2, width / 2, -a1 * Math.PI /
180, -(a1 + a2) * Math.PI / 180, true);
}
if (fill) {
this.gctx.fill();
} else {
this.gctx.stroke();
}
}
line_dashed(x1, y1, x2, y2, gc_type, idx, highlight, line_type) {
let dash = null;
line(x1, y1, x2, y2, draw_type, idx, highlight = 0, line_type = LineType.Solid) {
this.setupGCtx(draw_type, idx);
switch (line_type) {
case LineType.Solid:
break;
case LineType.Dashed1:
dash = [idx, idx];
this.gctx.setLineDash([idx, idx]);
break;
case LineType.Dashed2:
dash = [idx * 2, idx * 2];
this.gctx.setLineDash([idx * 2, idx * 2]);
break;
case LineType.Dashed3:
dash = [idx * 4, idx * 4];
this.gctx.setLineDash([idx * 4, idx * 4]);
break;
case LineType.Dotted:
dash = [idx, idx * 6];
this.gctx.setLineDash([idx, idx * 6]);
break;
case LineType.DotDashed1:
dash = [idx, idx * 2, idx * 4, idx * 2];
this.gctx.setLineDash([idx, idx * 2, idx * 4, idx * 2]);
break;
case LineType.DotDashed2:
dash = [idx, idx * 4, idx * 8, idx * 4];
this.gctx.setLineDash([idx, idx * 4, idx * 8, idx * 4]);
break;
default:
break;
}
this.gctx.strokeStyle = this.getColor(gc_type);
this.gctx.lineWidth = idx + 1;
this.gctx.beginPath();
if (dash !== null) {
this.gctx.setLineDash(dash);
}
this.gctx.moveTo(x1, y1);
this.gctx.lineTo(x2, y2);
this.gctx.stroke();
if (dash !== null) {
if (line_type !== LineType.Solid) {
this.gctx.setLineDash([]);
}
}
arc(x, y, width, height, a1, a2, gc_type, idx, highlight = 0) {
this.gctx.strokeStyle = this.getColor(gc_type);
this.gctx.lineWidth = idx + 1;
this.gctx.beginPath();
if (typeof this.gctx.ellipse === 'function') {
this.gctx.ellipse(x + width / 2, y + height / 2, width / 2, height / 2,
0, -a1 * Math.PI / 180, -(a1 + a2) * Math.PI / 180, true);
} else {
this.gctx.arc(x + width / 2, y + height / 2, width / 2, -a1 * Math.PI /
180, -(a1 + a2) * Math.PI / 180, true);
}
this.gctx.stroke();
}
fill_arc(x, y, width, height, a1, a2, gc_type) {
this.gctx.fillStyle = this.getColor(gc_type);
this.gctx.beginPath();
if (a2 !== 360) {
this.gctx.moveTo(x + width / 2, y + height / 2);
}
if (typeof this.gctx.ellipse === 'function') {
this.gctx.ellipse(x + width / 2, y + height / 2, width / 2, height / 2,
0, -a1 * Math.PI / 180, -(a1 + a2) * Math.PI / 180, true);
} else {
this.gctx.arc(x + width / 2, y + height / 2, width / 2, -a1 * Math.PI /
180, -(a1 + a2) * Math.PI / 180, true);
}
this.gctx.fill();
}
polyline(points, point_cnt, gc_type, idx, highlight) {
polyline(points, point_cnt, draw_type, fill: boolean, idx, highlight = 0) {
if (points.length === 0) {
return;
}
this.gctx.lineWidth = idx + 1;
this.gctx.strokeStyle = this.getColor(gc_type);
this.setupGCtx(draw_type, idx);
this.gctx.beginPath();
this.gctx.moveTo(points[0].x, points[0].y);
for (let i = 1; i < point_cnt; i++) {
this.gctx.lineTo(points[i].x, points[i].y);
}
this.gctx.stroke();
}
fill_polyline(points, point_cnt, gc_type, highlight) {
this.gctx.fillStyle = this.getColor(gc_type);
this.gctx.beginPath();
this.gctx.moveTo(points[0].x, points[0].y);
for (let i = 1; i < point_cnt; i++) {
this.gctx.lineTo(points[i].x, points[i].y);
if (fill) {
this.gctx.fill();
} else {
this.gctx.stroke();
}
this.gctx.fill();
}
text(x, y, text, gc_type, color, idx, highlight, line, font_idx, size, rot) {
text(x, y, text, draw_type, color, idx, highlight = 0, font_idx = 0, size = 0, rot = 0) {
let sizes = [8, 10, 12, 14, 14, 16, 18, 18];
let tsize = (idx <= 7) ? sizes[idx] : 3 * idx;
this.gctx.font = tsize + "px Arial";
this.gctx.lineWidth = 0.5;
this.gctx.fillStyle = this.getColor(color);
this.gctx.fillStyle = this.drawTypeToColor(color);
this.gctx.fillText(text, x, y);
}
getColor(gc_type) {
//console.log("CustomColor cnt", this.customcolors_cnt);
let rgb = GlowColor.rgb_color(gc_type, this.get_customcolors());
return "rgb(" + Math.floor(255 * rgb.r) + "," + Math.floor(255 * rgb.g) +
"," + Math.floor(255 * rgb.b) + ")";
image(x, y, w, h, image) {
this.gctx.drawImage(image, x, y, w, h);
}
getTextExtent(text, idx, type, gc_type): Point {
getTextExtent(text: string, draw_type, idx, font: Font, size = 0, rot = 0): Point {
let tsize = (idx < 0 || idx > 7) ? 3 * idx : [8, 10, 12, 14, 14, 16, 18, 18][idx];
this.gctx.font = tsize + "px Arial";
return new Point(this.gctx.measureText(text).width, tsize);
}
gradient_fill_rect(x, y, width, height, gc_type, f1, f2, gradient) {
this.setGradient(gradient, f1, f2, x, y, width, height);
this.gctx.fillRect(x, y, width, height);
}
gradient_fill_rectrounded(x, y, width, height, amount, gc_type, f1, f2, gradient) {
this.setGradient(gradient, f1, f2, x, y, width, height);
this.gctx.beginPath();
this.gctx.moveTo(x + amount, y);
this.gctx.arcTo(x + width, y, x + width, y + height, amount);
this.gctx.arcTo(x + width, y + height, x, y + height, amount);
this.gctx.arcTo(x, y + height, x, y, amount);
this.gctx.arcTo(x, y, x + width, y, amount);
this.gctx.closePath();
this.gctx.fill();
}
gradient_fill_arc(x, y, width, height, a1, a2, gc_type, f1, f2, gradient) {
this.setGradient(gradient, f1, f2, x, y, width, height);
this.gctx.beginPath();
if (a2 !== 360) {
this.gctx.moveTo(x + width / 2, y + height / 2);
}
if (typeof this.gctx.ellipse === 'function') {
this.gctx.ellipse(x + width / 2, y + height / 2, width / 2, height / 2,
0, -a1 * Math.PI / 180, -(a1 + a2) * Math.PI / 180, true);
} else {
this.gctx.arc(x + width / 2, y + height / 2, width / 2, -a1 * Math.PI /
180, -(a1 + a2) * Math.PI / 180, true);
}
this.gctx.fill();
}
gradient_fill_polyline(points, point_cnt, gc_type, f1, f2, gradient) {
if (points.length === 0) {
return;
}
let color = this.getColor(gc_type);
// this.gctx.fillStyle = this.getColor( gc_type);
this.gctx.beginPath();
this.gctx.moveTo(points[0].x, points[0].y);
let points2 = points.slice(0, point_cnt);
let ll_x = points2.reduce((a, b) => Math.min(a, b.x), Number.MAX_VALUE);
let ll_y = points2.reduce((a, b) => Math.min(a, b.y), Number.MAX_VALUE);
let ur_x = points2.reduce((a, b) => Math.max(a, b.x), -Number.MAX_VALUE);
let ur_y = points2.reduce((a, b) => Math.max(a, b.y), -Number.MAX_VALUE);
points2.slice(1).forEach(e => this.gctx.lineTo(e.x, e.y));
this.setGradient(gradient, f1, f2, ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
this.gctx.fill();
}
image(image, x, y, w, h) {
this.gctx.drawImage(image, x, y, w, h);
}
gradient_rotate(rotate, gradient) {
return gradient;
}
setGradient(gradient, f1, f2, x, y, w, h) {
createGradient(x, y, w, h, f1, f2, gradient) {
let gr = Math.sqrt(w * w + h * h);
if (gradient === Gradient.Globe || gradient === Gradient.RadialCenter) {
gr /= 4;
......@@ -295,29 +205,151 @@ class GlowDraw {
case Gradient.VerticalLeft:
case Gradient.DiagonalUpperLeft:
case Gradient.DiagonalLowerLeft:
grad.addColorStop(0, this.getColor(f2));
grad.addColorStop(1, this.getColor(f1));
grad.addColorStop(0, this.drawTypeToColor(f2));
grad.addColorStop(1, this.drawTypeToColor(f1));
break;
case Gradient.HorizontalTube1:
case Gradient.VerticalTube1:
case Gradient.DiagonalUpTube:
case Gradient.DiagonalDownTube:
grad.addColorStop(0, this.getColor(f1));
grad.addColorStop(0.5, this.getColor(f2));
grad.addColorStop(1, this.getColor(f1));
grad.addColorStop(0, this.drawTypeToColor(f1));
grad.addColorStop(0.5, this.drawTypeToColor(f2));
grad.addColorStop(1, this.drawTypeToColor(f1));
break;
case Gradient.HorizontalTube2:
case Gradient.VerticalTube2:
grad.addColorStop(0, this.getColor(f1));
grad.addColorStop(0.3, this.getColor(f2));
grad.addColorStop(0.95, this.getColor(f1));
grad.addColorStop(0, this.drawTypeToColor(f1));
grad.addColorStop(0.3, this.drawTypeToColor(f2));
grad.addColorStop(0.95, this.drawTypeToColor(f1));
break;
default:
grad.addColorStop(0, this.getColor(f1));
grad.addColorStop(1, this.getColor(f2));
grad.addColorStop(0, this.drawTypeToColor(f1));
grad.addColorStop(1, this.drawTypeToColor(f2));
break;
}
this.gctx.fillStyle = grad;
return grad;
}
gradient_rotate(rotation, gradient) {
let g = gradient;
let rot = (rotation / 360 - Math.floor(rotation / 360)) * 360;
while (rot > 45) {
switch (g) {
case Gradient.HorizontalUp:
g = Gradient.VerticalRight;
break;
case Gradient.HorizontalDown:
g = Gradient.VerticalLeft;
break;
case Gradient.HorizontalTube1:
g = Gradient.VerticalTube1;
break;
case Gradient.HorizontalTube2:
g = Gradient.VerticalTube2;
break;
case Gradient.VerticalLeft:
g = Gradient.HorizontalUp;
break;
case Gradient.VerticalRight:
g = Gradient.HorizontalDown;
break;
case Gradient.VerticalTube1:
g = Gradient.HorizontalTube1;
break;
case Gradient.VerticalTube2:
g = Gradient.HorizontalTube2;
break;
case Gradient.DiagonalUpperLeft:
g = Gradient.DiagonalUpperRight;
break;
case Gradient.DiagonalLowerLeft:
g = Gradient.DiagonalUpperLeft;
break;
case Gradient.DiagonalUpperRight:
g = Gradient.DiagonalLowerRight;
break;
case Gradient.DiagonalLowerRight:
g = Gradient.DiagonalLowerLeft;
break;
case Gradient.DiagonalUpTube:
g = Gradient.DiagonalDownTube;
break;
case Gradient.DiagonalDownTube:
g = Gradient.DiagonalUpTube;
break;
case Gradient.RadialUpperLeft:
g = Gradient.RadialUpperRight;
break;
case Gradient.RadialLowerLeft:
g = Gradient.RadialUpperLeft;
break;
case Gradient.RadialUpperRight:
g = Gradient.RadialLowerRight;
break;
case Gradient.RadialLowerRight:
g = Gradient.RadialLowerLeft;
break;
default:
break;
}
rot -= 90;
}
return g;
}
gradient_fill_rect(x, y, width, height, draw_type, f1, f2, gradient) {
this.gctx.fillStyle = this.createGradient(x, y, width, height, f1, f2, gradient);
this.gctx.fillRect(x, y, width, height);
}
gradient_fill_rectrounded(x, y, width, height, amount, draw_type, f1, f2, gradient) {
this.gctx.fillStyle = this.createGradient(x, y, width, height, f1, f2, gradient);
this.gctx.beginPath();
this.gctx.moveTo(x + amount, y);
this.gctx.arcTo(x + width, y, x + width, y + height, amount);
this.gctx.arcTo(x + width, y + height, x, y + height, amount);
this.gctx.arcTo(x, y + height, x, y, amount);
this.gctx.arcTo(x, y, x + width, y, amount);
this.gctx.closePath();
this.gctx.fill();
}
gradient_fill_arc(x, y, width, height, a1, a2, draw_type, f1, f2, gradient) {
this.gctx.fillStyle = this.createGradient(x, y, width, height, f1, f2, gradient);
this.gctx.beginPath();
if (a2 !== 360) {
this.gctx.moveTo(x + width / 2, y + height / 2);
}
if (typeof this.gctx.ellipse === 'function') {
this.gctx.ellipse(x + width / 2, y + height / 2, width / 2, height / 2,
0, -a1 * Math.PI / 180, -(a1 + a2) * Math.PI / 180, true);
} else {
this.gctx.arc(x + width / 2, y + height / 2, width / 2, -a1 * Math.PI /
180, -(a1 + a2) * Math.PI / 180, true);
}
this.gctx.fill();
}
gradient_fill_polyline(points, point_cnt, draw_type, f1, f2, gradient) {
if (points.length === 0) {
return;
}
let points2 = points.slice(0, point_cnt);
let ll_x = points2.reduce((a, b) => Math.min(a, b.x), Number.MAX_VALUE);
let ll_y = points2.reduce((a, b) => Math.min(a, b.y), Number.MAX_VALUE);
let ur_x = points2.reduce((a, b) => Math.max(a, b.x), -Number.MAX_VALUE);
let ur_y = points2.reduce((a, b) => Math.max(a, b.y), -Number.MAX_VALUE);
this.gctx.fillStyle = this.createGradient(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, f1, f2, gradient);
this.gctx.beginPath();
this.gctx.moveTo(points[0].x, points[0].y);
points2.slice(1).forEach(e => this.gctx.lineTo(e.x, e.y));
this.gctx.fill();
}
set_clip_rectangle(x1, y1, x2, y2) {
......
......@@ -691,20 +691,6 @@ class PlowRect {
}
}
class GDraw {
ctx: PlowCtx;
canvas: HTMLCanvasElement;
gctx: CanvasRenderingContext2D;
offset_top: number;
constructor(ctx) {
this.ctx = ctx;
this.canvas = document.querySelector("canvas");
this.gctx = this.canvas.getContext("2d");
this.offset_top = this.canvas.offsetTop;
}
}
class PlowCtx {
gdh: Gdh = null;
nodraw = 0;
......@@ -716,7 +702,7 @@ class PlowCtx {
a: PlowArray;
a_nc: PlowArray;
name = "Claes context";
gdraw: GDraw;
gdraw: Draw;
select_object: PlowNode = null;
event_cb: (event: object, object: PlowNode, x: number, y: number) => void = null;
event_object: PlowNode = null;
......@@ -724,7 +710,7 @@ class PlowCtx {
constructor() {
this.a = new PlowArray(this);
this.a_nc = new PlowArray(this);
this.gdraw = new GDraw(this);
this.gdraw = new Draw(this);
this.rect = new Rect();
}
......
......@@ -46,10 +46,11 @@
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="pwr.js"></script>
<script type="text/babel" src="cli.js"></script>
<script type="text/babel" src="gdh.js"></script>
<script type="text/babel" src="plow.js"></script>
<script type="text/babel" src="pwr.ts"></script>
<script type="text/babel" src="cli.ts"></script>
<script type="text/babel" src="gdh.ts"></script>
<script type="text/babel" src="draw.ts"></script>
<script type="text/babel" src="plow.ts"></script>
<script type="text/babel" src="ev.ts"></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
......@@ -579,13 +579,13 @@ class Ev {
case Event.Key_CtrlL:
let o = this.ctx.get_select();
if (o.userdata instanceof EvItemAlarm) {
this.ctx.gdh.getObject(o.userdata.objid, GdhOp.GET_OP_METHOD_PLC).then(this.open_plc_cb);
this.ctx.gdh.getObjectFromAref(o.userdata.e.supObject, GdhOp.GET_OP_METHOD_PLC).then(this.open_plc_cb);
}
break;
case Event.Key_CtrlG:
let o = this.ctx.get_select();
if (o.userdata instanceof EvItemAlarm) {
this.ctx.gdh.getObject(o.userdata.objid, GdhOp.GET_OP_METHOD_PLC).then(this.open_objectgraph_cb);
this.ctx.gdh.getObjectFromAref(o.userdata.e.supObject, GdhOp.GET_OP_METHOD_PLC).then(this.open_objectgraph_cb);
}
break;
default:
......
......@@ -22,8 +22,9 @@
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="pwr.js"></script>
<script type="text/babel" src="gdh.js"></script>
<script type="text/babel" src="pwr.ts"></script>
<script type="text/babel" src="gdh.ts"></script>
<script type="text/babel" src="draw.ts"></script>
<script type="text/babel" src="flow.ts"></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
......@@ -214,34 +214,6 @@ enum Save {
Triangle_rect_part = 2000
}
class GDraw {
ctx: FlowCtx;
canvas: HTMLCanvasElement;
gctx: CanvasRenderingContext2D;
offset_top: number;
offset_left: number;
constructor(ctx: FlowCtx) {
this.ctx = ctx;
this.canvas = document.querySelector("canvas");
this.gctx = this.canvas.getContext("2d");
this.offset_top = this.canvas.offsetTop;
this.offset_left = this.canvas.offsetTop;
console.log("offset_top", this.offset_top, "offset_left", this.offset_left);
}
rect(x, y, width, height) {
this.gctx.strokeRect(x, y, width, height);
}
line(x1, y1, x2, y2) {
this.gctx.beginPath();
this.gctx.moveTo(x1, y1);
this.gctx.lineTo(x2, y2);
this.gctx.stroke();
}
}
class FlowArray {
ctx: FlowCtx;
a = [];
......@@ -1548,7 +1520,7 @@ class FlowCtx extends Rect {
a: FlowArray;
a_nc: FlowArray;
a_cc: FlowArray;
gdraw: GDraw;
gdraw: Draw;
display_level = DisplayLevel.One;
gdh: Gdh = null;
zoom_factor = 20.0;
......@@ -1563,7 +1535,7 @@ class FlowCtx extends Rect {
this.a = new FlowArray(this);
this.a_nc = new FlowArray(this);
this.a_cc = new FlowArray(this);
this.gdraw = new GDraw(this);
this.gdraw = new Draw(this);
}
draw() {
......
......@@ -8,9 +8,10 @@
<body>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="pwr.js"></script>
<script type="text/babel" src="cli.js"></script>
<script type="text/babel" src="gdh.js"></script>
<script type="text/babel" src="pwr.ts"></script>
<script type="text/babel" src="cli.ts"></script>
<script type="text/babel" src="gdh.ts"></script>
<script type="text/babel" src="draw.ts"></script>
<script type="text/babel" src="glow.ts"></script>
<script type="text/babel" src="glow_color.ts"></script>
......@@ -25,7 +26,6 @@
<script type="text/babel" src="glow_con.ts"></script>
<script type="text/babel" src="glow_conclass.ts"></script>
<script type="text/babel" src="glow_conpoint.ts"></script>
<script type="text/babel" src="glow_draw.ts"></script>
<script type="text/babel" src="glow_line.ts"></script>
<script type="text/babel" src="glow_node.ts"></script>
<script type="text/babel" src="glow_nodeclass.ts"></script>
......
......@@ -108,7 +108,7 @@ class Appl {
let arrTmp = ["pwrb", "pwrs", "nmps", "profibus", "otherio", "opc",
"basecomponent", "abb", "siemens", "ssabox"];
if (arrTmp.some(e => urlValue.startsWith(e + "_"))) { // Object reference manual
urlValue = "$pwr_doc/" + getLang() + "/orm/" + urlValue;
urlValue = "$pwr_doc/en_us/orm/" + urlValue;
}
console.log("open url " + urlValue);
......@@ -160,15 +160,15 @@ class Appl {
}
}
} else if (command === ("HELP")) {
let fileName = "xtt_help_";
let fileName = "/pwrp_web/xtt_help_";
let bookmarkValue = null;
if (cli.qualifierFound("/VERSION")) {
fileName = this.pwrHost + "xtt_version_help_version.html";
fileName = window.location.hostname + "/pwr_doc/xtt_version_help_version.html";
this.openURL(fileName, null);
} else {
if (cli.qualifierFound("/BASE")) { // Not language dependent !! TODO
fileName = this.pwrHost + "help/xtt_help_";
fileName = "/pwr_doc/help/xtt_help_";
}
for (let i = 0; i < 4; i++) {
......@@ -179,14 +179,14 @@ class Appl {
let arrTmp = ["pwrb", "pwrs", "nmps", "profibus", "otherio", "opc",
"basecomponent", "abb", "siemens", "ssabox"];
if (arrTmp.some(e => fileName.startsWith(e + "_"))) { // Object reference manual
fileName = "$pwr_doc/orm/" + fileName;
fileName = "/pwr_doc/orm/" + fileName;
}
bookmarkValue = getQualIfExists("/BOOKMARK");
fileName += ".html";
console.log("Loading helpfile \"" + fileName + "\"");
this.openURL(fileName, bookmarkValue);
this.openURL(window.location.hostname + fileName, bookmarkValue);
}
} else if (command === ("CHECK")) {
let cli_arg1 = getQualIfExists("cli_arg1");
......
......@@ -81,7 +81,7 @@ class GlowArc {
idx = Math.max(0, idx);
idx = Math.min(idx, DRAW_TYPE_SIZE - 1);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.angle1,
this.angle2, this.draw_type, idx, highlight);
this.angle2, this.draw_type, false, idx, highlight);
}
draw_shadow(border, shadow, highlight, hot) {
......@@ -110,78 +110,78 @@ class GlowArc {
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs *
2, this.angle1 + 45, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs * 2,
this.angle1, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1 +
45, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1, this.angle2 -
45, GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
45, GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
} else if (this.angle1 === 90) {
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs * 2,
this.angle1, this.angle2,
GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1, this.angle2,
GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
} else if (this.angle1 === 180) {
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs *
2, this.angle1 + 45, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs * 2,
this.angle1, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1 +
45, this.angle2 - 45,
GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1, this.angle2 -
45, GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
45, GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
} else if (this.angle1 === 270) {
this.ctx.gdraw.arc(ll_x + idx / 2 - idx + offs, ll_y + idx / 2 - idx +
offs, ur_x - ll_x + idx - offs * 2, ur_y - ll_y + idx - offs * 2,
this.angle1, this.angle2,
GlowColor.shift_drawtype(this.draw_type, 2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, 2, null), false, ish - 1,
highlight);
this.ctx.gdraw.arc(ll_x + idx / 2 - offs, ll_y + idx / 2 - offs,
Math.max(0, ur_x - ll_x - idx + offs * 2),
Math.max(0, ur_y - ll_y - idx + offs * 2), this.angle1, this.angle2,
GlowColor.shift_drawtype(this.draw_type, -2, null), ish - 1,
GlowColor.shift_drawtype(this.draw_type, -2, null), false, ish - 1,
highlight);
}
}
if (border !== 0) {
this.ctx.gdraw.arc(ll_x + idx / 2 - idx, ll_y + idx / 2 - idx, ur_x -
ll_x + idx, ur_y - ll_y + idx, this.angle1, this.angle2,
DrawType.Line, 0, highlight);
DrawType.Line, false, 0, highlight);
if (idx > 0) {
this.ctx.gdraw.arc(ll_x + idx / 2, ll_y + idx / 2,
Math.max(0, ur_x - ll_x - idx), Math.max(0, ur_y - ll_y - idx),
this.angle1, this.angle2, DrawType.Line, 0, highlight);
this.angle1, this.angle2, DrawType.Line, false, 0, highlight);
}
}
}
......
......@@ -111,8 +111,8 @@ class GrowAnnot extends GlowAnnot {
if (rot < 45 || rot >= 315) {
if (node.annotv_inputmode[this.number] !== 0 &&
node.input_selected !== 0) {
this.ctx.gdraw.fill_rect(x1, y1 - height + descent, width, height,
DrawType.MediumGray);
this.ctx.gdraw.rect(x1, y1 - height + descent, width, height,
DrawType.MediumGray, true, 0);
}
} else {
// Text is rotated, adjust the coordinates
......@@ -143,7 +143,7 @@ class GrowAnnot extends GlowAnnot {
}
this.ctx.gdraw.text(x1, y1, node.annotv[this.number], ldraw_type, color,
idx, highlight, 0, lfont, tsize, rot);
idx, highlight, lfont, tsize, rot);
break;
case AnnotType.MultiLine:
break;
......@@ -167,8 +167,8 @@ class GrowAnnot extends GlowAnnot {
}
idx = Math.min(idx, DRAW_TYPE_SIZE - 1);
return this.ctx.gdraw.getTextExtent(node.annotv[this.number], idx,
this.font, this.draw_type);
return this.ctx.gdraw.getTextExtent(node.annotv[this.number], this.draw_type, idx,
this.font);
}
event_handler(event, fx, fy) {
......
......@@ -230,8 +230,8 @@ class GrowArc extends GlowArc {
if (!display_shadow || this.shadow_width === 0 || this.angle2 !== 360) {
if (grad === Gradient.No || fillcolor === DrawType.ColorRed) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y -
ll_y, this.angle1 - rot, this.angle2, drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y -
ll_y, this.angle1 - rot, this.angle2, drawtype, true, 0);
} else {
let fa1, fa2;
if (this.gradient_contrast >= 0) {
......@@ -265,15 +265,15 @@ class GrowArc extends GlowArc {
let drawtype = GlowColor.shift_drawtype(fillcolor, -drawtype_incr + chot,
colornode);
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 35, 140,
drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 35, 140,
drawtype, true, 0);
// Draw dark shadow
drawtype = GlowColor.shift_drawtype(fillcolor, drawtype_incr + chot,
colornode);
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 215,
140, drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 215,
140, drawtype, true, 0);
// Draw medium shadow and body
if (chot === 0) {
......@@ -282,14 +282,14 @@ class GrowArc extends GlowArc {
drawtype = GlowColor.shift_drawtype(fillcolor, chot, null);
}
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, -5, 40,
drawtype);
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 175, 40,
drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, -5, 40,
drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 175, 40,
drawtype, true, 0);
this.ctx.gdraw.fill_arc(ll_x + ish, ll_y + ish, ur_x - ll_x - 2 *
this.ctx.gdraw.arc(ll_x + ish, ll_y + ish, ur_x - ll_x - 2 *
ish, ur_y - ll_y - 2 * ish, this.angle1 - rot, this.angle2,
drawtype);
drawtype, true, 0);
} else {
// Draw shadow
let fb1 = GlowColor.shift_drawtype(fillcolor, -drawtype_incr + chot,
......@@ -328,7 +328,7 @@ class GrowArc extends GlowArc {
GlowColor.get_drawtype(this.draw_type, DrawType.LineHighlight,
highlight, colornode, 0, 0);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.angle1 -
rot, this.angle2, drawtype, idx);
rot, this.angle2, drawtype, false, idx);
}
}
......
......@@ -232,8 +232,8 @@ class GrowAxis extends GrowRect {
if (i % this.valuequotient === 0) {
let text = this.format_text(this.format, this.max_value - i *
this.increment);
let p = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p.x;
z_height = p.y;
z_descent = z_height / 4;
......@@ -275,8 +275,7 @@ class GrowAxis extends GrowRect {
y_text = y + (z_height - z_descent) / 2;
}
this.ctx.gdraw.text(ll_x, y_text, text, this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0,
Font.Helvetica, tsize, 0);
this.text_color_drawtype, text_idx, highlight, Font.Helvetica, tsize, 0);
}
}
}
......@@ -287,8 +286,8 @@ class GrowAxis extends GrowRect {
// Calculate max value text height
if (draw_text) {
let p2 = this.ctx.gdraw.getTextExtent("0", Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p2 = this.ctx.gdraw.getTextExtent("0", this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p2.x;
z_height = p2.y;
......@@ -314,8 +313,8 @@ class GrowAxis extends GrowRect {
if (draw_text && i % this.valuequotient === 0) {
let text =
this.format_text(this.format, this.max_value - i * this.increment);
let p3 = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p3 = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p3.x;
z_height = p3.y;
z_descent = z_height / 4;
......@@ -330,7 +329,7 @@ class GrowAxis extends GrowRect {
}
this.ctx.gdraw.text(x_text, ll_y + z_height - z_descent, text,
this.text_drawtype, this.text_color_drawtype, text_idx, highlight,
0, Font.Helvetica, tsize, 0);
Font.Helvetica, tsize, 0);
}
}
}
......@@ -345,8 +344,8 @@ class GrowAxis extends GrowRect {
if (i % this.valuequotient === 0) {
let text = this.format_text(this.format, this.max_value - i *
this.increment);
let p4 = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p4 = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p4.x;
z_height = p4.y;
z_descent = z_height / 4;
......@@ -388,8 +387,7 @@ class GrowAxis extends GrowRect {
y_text = y + (z_height - z_descent) / 2;
}
this.ctx.gdraw.text(x_text, y_text, text, this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0,
Font.Helvetica, tsize, 0);
this.text_color_drawtype, text_idx, highlight, Font.Helvetica, tsize, 0);
}
}
} else { // if ( 225 < rotation && rotation <= 315)
......@@ -399,8 +397,8 @@ class GrowAxis extends GrowRect {
// Calculate max value text height
if (draw_text) {
let p5 = this.ctx.gdraw.getTextExtent("0", Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p5 = this.ctx.gdraw.getTextExtent("0", this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p5.x;
z_height = p5.y;
......@@ -424,8 +422,8 @@ class GrowAxis extends GrowRect {
if (draw_text && i % this.valuequotient === 0) {
let text =
this.format_text(this.format, this.max_value - i * this.increment);
let p6 = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p6 = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p6.x;
z_height = p6.y;
z_descent = z_height / 4;
......@@ -439,8 +437,7 @@ class GrowAxis extends GrowRect {
x_text = x - (z_width) / 2;
}
this.ctx.gdraw.text(x_text, ur_y, text, this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0,
Font.Helvetica, tsize, 0);
this.text_color_drawtype, text_idx, highlight, Font.Helvetica, tsize, 0);
}
}
}
......
......@@ -168,8 +168,8 @@ class GrowAxisArc extends GrowArc {
} else {
text = this.format_text(this.format, this.min_value + this.increment);
}
let p = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
let p = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p.x;
z_height = p.y;
z_descent = z_height / 4;
......@@ -209,8 +209,8 @@ class GrowAxisArc extends GrowArc {
(this.increment < 0 && i === 0)))) {
text = this.format_text(this.format, this.min_value + i *
this.increment);
p = this.ctx.gdraw.getTextExtent(text, Math.max(0, text_idx),
Font.Helvetica, this.text_drawtype);
p = this.ctx.gdraw.getTextExtent(text, this.text_drawtype, Math.max(0, text_idx),
Font.Helvetica);
z_width = p.x;
z_height = p.y;
z_descent = z_height / 4;
......@@ -228,8 +228,7 @@ class GrowAxisArc extends GrowArc {
xt -= z_width / 2;
}
this.ctx.gdraw.text(xt, yt, text, this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0,
Font.Helvetica, tsize, 0);
this.text_color_drawtype, text_idx, highlight, Font.Helvetica, tsize, 0);
}
}
}
......
......@@ -127,8 +127,8 @@ class GrowBar extends GrowRect {
highlight, colornode, 1, 0);
if (grad === Gradient.No) {
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype, true, 0);
} else {
let rotation = (t) ? this.trf.rot(t) : this.trf.rot();
......@@ -199,7 +199,7 @@ class GrowBar extends GrowRect {
}
if (grad === Gradient.No) {
this.ctx.gdraw.fill_rect(x0, y0, width, height, dt);
this.ctx.gdraw.rect(x0, y0, width, height, dt, true, 0);
} else {
rotation = (t) ? this.trf.rot(t) : this.trf.rot();
......@@ -225,8 +225,7 @@ class GrowBar extends GrowRect {
}
if (this.border !== 0) {
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx,
0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, false, idx);
}
}
......
......@@ -118,12 +118,12 @@ class GrowBarArc extends GrowArc {
let bg_drawtype = (this.background_drawtype === DrawType.No) ? this.ctx.background_color : this.background_drawtype;
// Draw circle background
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 0, 360,
bg_drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, 0, 360,
bg_drawtype, true, 0);
// Draw bar background
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.angle1 -
Math.floor(rotation), this.angle2, drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.angle1 -
Math.floor(rotation), this.angle2, drawtype, true, 0);
// Draw bar
let ang = this.angle1 - rotation;
......@@ -132,9 +132,8 @@ class GrowBarArc extends GrowArc {
}
if (this.gradient === Gradient.No) {
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
ang, this.angle2 * (value - this.min_value) /
(this.max_value - this.min_value), this.bar_drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, ang,
this.angle2 * (value - this.min_value) / (this.max_value - this.min_value), this.bar_drawtype, true, 0);
} else {
let f1, f2;
if (this.gradient_contrast >= 0) {
......@@ -157,8 +156,8 @@ class GrowBarArc extends GrowArc {
}
// Draw inner circle background
this.ctx.gdraw.fill_arc(ll_x + width, ll_y + yscale * width, ur_x - ll_x -
2 * width, ur_y - ll_y - yscale * 2 * width, 0, 360, bg_drawtype);
this.ctx.gdraw.arc(ll_x + width, ll_y + yscale * width, ur_x - ll_x -
2 * width, ur_y - ll_y - yscale * 2 * width, 0, 360, bg_drawtype, true, 0);
if (this.bar_direction === 0) {
ang = Math.PI *
......@@ -181,11 +180,11 @@ class GrowBarArc extends GrowArc {
DrawType.LineHighlight, highlight, colornode, 0, 0);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.angle1 -
Math.floor(rotation), this.angle2, bordercolor, idx);
Math.floor(rotation), this.angle2, bordercolor, false, idx);
this.ctx.gdraw.arc(ll_x + width, ll_y + yscale * width, ur_x - ll_x - 2 *
width, ur_y - ll_y - yscale * 2 * width, this.angle1 -
Math.floor(rotation), this.angle2, bordercolor, idx);
Math.floor(rotation), this.angle2, bordercolor, false, idx);
ang = Math.PI * (this.angle1 - rotation) / 180;
this.ctx.gdraw.line((ur_x + ll_x) / 2 + (ur_x - ll_x) / 2 *
......
......@@ -230,8 +230,8 @@ class GrowBarChart extends GrowRect {
} else {
drawtype = GlowColor.shift_drawtype(fillcolor, chot, null);
}
this.ctx.gdraw.fill_rect(bar_ll_x, bar_up_ll_y, bar_ur_x -
bar_ll_x, bar_up_ur_y - bar_up_ll_y, drawtype);
this.ctx.gdraw.rect(bar_ll_x, bar_up_ll_y, bar_ur_x -
bar_ll_x, bar_up_ur_y - bar_up_ll_y, drawtype, true, 0);
} else {
let f1, f2;
if (this.gradient_contrast >= 0) {
......@@ -291,8 +291,8 @@ class GrowBarChart extends GrowRect {
if (grad === Gradient.No ||
fillcolor === DrawType.ColorRed || i === this.barsegments) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_rect(bar_ll_x, bar_down_ll_y, bar_ur_x -
bar_ll_x, bar_down_ur_y - bar_down_ll_y, drawtype);
this.ctx.gdraw.rect(bar_ll_x, bar_down_ll_y, bar_ur_x -
bar_ll_x, bar_down_ur_y - bar_down_ll_y, drawtype, true, 0);
} else {
let f1, f2;
if (this.gradient_contrast >= 0) {
......@@ -324,7 +324,7 @@ class GrowBarChart extends GrowRect {
DrawType.LineHighlight, highlight, colornode, 0, 0);
this.ctx.gdraw.rect(brect_ll_x, brect_ll_y, brect_width,
brect_height, drawtype, idx, 0);
brect_height, drawtype, false, idx);
}
if (this.min_value >= 0) {
brect_ll_x = bar_ll_x;
......@@ -344,7 +344,7 @@ class GrowBarChart extends GrowRect {
DrawType.LineHighlight, highlight, colornode, 0, 0);
this.ctx.gdraw.rect(brect_ll_x, brect_ll_y, brect_width,
brect_height, drawtype, idx, 0);
brect_height, drawtype, false, idx);
}
// Draw negative bar border
......@@ -354,7 +354,7 @@ class GrowBarChart extends GrowRect {
DrawType.LineHighlight, highlight, colornode, 0, 0);
this.ctx.gdraw.rect(brect_ll_x, brect_ll_y, brect_width,
brect_height, drawtype, idx, 0);
brect_height, drawtype, false, idx);
}
brect_ll_x = bar_ll_x;
brect_ll_y = ur_y + this.min_value * (ur_y - ll_y) /
......@@ -367,7 +367,7 @@ class GrowBarChart extends GrowRect {
DrawType.LineHighlight, highlight, colornode, 0, 0);
this.ctx.gdraw.rect(brect_ll_x, brect_ll_y, brect_width,
brect_height, drawtype, idx, 0);
brect_height, drawtype, false, idx);
}
}
}
......@@ -394,8 +394,7 @@ class GrowBarChart extends GrowRect {
drawtype =
GlowColor.get_drawtype(this.draw_type, DrawType.LineHighlight,
highlight, colornode, 0, 0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx,
0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, false, idx);
}
}
......
......@@ -110,8 +110,8 @@ class GrowConGlue extends GrowNode {
if (lw_up !== -1 && lw_down === -1 && lw_right === -1 && lw_left === -1) {
// Up termination
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype, true, 0);
if (this.shadow !== 0 && idx_up > 2) {
if (this.border !== 0) {
idx_up -= 2;
......@@ -143,8 +143,8 @@ class GrowConGlue extends GrowNode {
} else if (lw_up === -1 && lw_down !== -1 && lw_right === -1 &&
lw_left === -1) {
// Down termination
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype, true, 0);
if (this.shadow !== 0 && idx_down > 2) {
if (this.border !== 0) {
idx_down -= 2;
......@@ -176,8 +176,8 @@ class GrowConGlue extends GrowNode {
} else if (lw_up === -1 && lw_down === -1 && lw_right !== -1 &&
lw_left === -1) {
// Right termination
this.ctx.gdraw.fill_rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype);
this.ctx.gdraw.rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype, true, 0);
if (this.shadow !== 0 && idx_right > 2) {
if (this.border !== 0) {
idx_right -= 2;
......@@ -209,8 +209,8 @@ class GrowConGlue extends GrowNode {
} else if (lw_up === -1 && lw_down === -1 && lw_right === -1 &&
lw_left !== -1) {
// Left termination
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype, true, 0);
if (this.shadow !== 0 && idx_left > 2) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -242,10 +242,10 @@ class GrowConGlue extends GrowNode {
} else if (lw_up !== -1 && lw_down !== -1 && lw_right === -1 &&
lw_left === -1) {
// Vertical glue
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype, true, 0);
if (this.shadow !== 0 && idx_down > 2) {
if (this.border !== 0) {
......@@ -286,10 +286,10 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right !== -1 && lw_up === -1 &&
lw_down === -1) {
// Horizontal glue
this.ctx.gdraw.fill_rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_right > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -329,10 +329,10 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right === -1 && lw_up !== -1 &&
lw_down === -1) {
// Left up corner
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y + idx_left /
2, idx_up + 1, ur_y - (m_y + idx_left / 2), drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_up / 2 - ll_x + 1, idx_left + 1, drawtype);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y + idx_left /
2, idx_up + 1, ur_y - (m_y + idx_left / 2), drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_up / 2 - ll_x + 1, idx_left + 1, drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_up > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -366,11 +366,11 @@ class GrowConGlue extends GrowNode {
} else if (lw_left === -1 && lw_right !== -1 && lw_up !== -1 &&
lw_down === -1) {
// Right up corner
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
idx_right / 2, idx_up + 1, ur_y - (m_y - idx_right + idx_right / 2),
drawtype);
this.ctx.gdraw.fill_rect(m_x + idx_up / 2, m_y - idx_right + idx_right /
2, ur_x - (m_x + idx_up / 2), idx_right + 1, drawtype);
drawtype, true, 0);
this.ctx.gdraw.rect(m_x + idx_up / 2, m_y - idx_right + idx_right /
2, ur_x - (m_x + idx_up / 2), idx_right + 1, drawtype, true, 0);
if (this.shadow !== 0 && (idx_right > 2 || idx_up > 2)) {
if (this.border !== 0) {
idx_right -= 2;
......@@ -407,11 +407,11 @@ class GrowConGlue extends GrowNode {
} else if (lw_left === -1 && lw_right !== -1 && lw_up === -1 &&
lw_down !== -1) {
// Right down corner
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - idx_right + idx_right / 2 - ll_y, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, m_y - idx_right +
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - idx_right + idx_right / 2 - ll_y, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, m_y - idx_right +
idx_right / 2, ur_x - (m_x - idx_down + idx_down / 2), idx_right + 1,
drawtype);
drawtype, true, 0);
if (this.shadow !== 0 && (idx_right > 2 || idx_down > 2)) {
if (this.border !== 0) {
idx_right -= 2;
......@@ -446,10 +446,10 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right === -1 && lw_up === -1 &&
lw_down !== -1) {
// Left down corner
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_left / 2 - ll_y + 1, drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
idx_down + idx_down / 2 - ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_left / 2 - ll_y + 1, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
idx_down + idx_down / 2 - ll_x, idx_left + 1, drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_down > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -487,13 +487,13 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right !== -1 && lw_up === -1 &&
lw_down !== -1) {
// Left right down threeway
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y + 1, drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_down / 2 - ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, m_y - idx_right +
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y + 1, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_down / 2 - ll_x, idx_left + 1, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, m_y - idx_right +
idx_right / 2, ur_x - (m_x - idx_down + idx_down / 2), idx_right + 1,
drawtype);
drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_right > 2 || idx_down > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -566,13 +566,13 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right !== -1 && lw_up !== -1 &&
lw_down === -1) {
// Left right up threeway
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_up / 2 - ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x +
idx_up / 2 - ll_x, idx_left + 1, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
idx_right / 2, ur_x - (m_x - idx_up + idx_up / 2), idx_right + 1,
drawtype);
drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_right > 2 || idx_up > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -653,13 +653,13 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right === -1 && lw_up !== -1 &&
lw_down !== -1) {
// Left up down threeway
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y - idx_left +
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y - idx_left +
idx_left / 2, idx_up + 1, ur_y - (m_y - idx_left + idx_left / 2),
drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_left / 2 - ll_y, drawtype);
drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_left / 2 - ll_y, drawtype, true, 0);
if (this.shadow !== 0 && (idx_left > 2 || idx_down > 2 || idx_up > 2)) {
if (this.border !== 0) {
idx_left -= 2;
......@@ -739,13 +739,13 @@ class GrowConGlue extends GrowNode {
} else if (lw_left === -1 && lw_right !== -1 && lw_up !== -1 &&
lw_down !== -1) {
// Right up down threeway
this.ctx.gdraw.fill_rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
this.ctx.gdraw.rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y - idx_right +
idx_right / 2, idx_up + 1, ur_y - (m_y - idx_right + idx_right / 2),
drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_right / 2 - ll_y, drawtype);
drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y + idx_right / 2 - ll_y, drawtype, true, 0);
if (this.shadow !== 0 && (idx_right > 2 || idx_down > 2 || idx_up > 2)) {
if (this.border !== 0) {
idx_right -= 2;
......@@ -826,14 +826,14 @@ class GrowConGlue extends GrowNode {
} else if (lw_left !== -1 && lw_right !== -1 && lw_up !== -1 &&
lw_down !== -1) {
// Right left up down fourway
this.ctx.gdraw.fill_rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype);
this.ctx.gdraw.fill_rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype);
this.ctx.gdraw.fill_rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype);
this.ctx.gdraw.rect(m_x, m_y - idx_right + idx_right / 2, ur_x -
m_x, idx_right + 1, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, m_y - idx_left + idx_left / 2, m_x -
ll_x, idx_left + 1, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_up + idx_up / 2, m_y, idx_up +
1, ur_y - m_y, drawtype, true, 0);
this.ctx.gdraw.rect(m_x - idx_down + idx_down / 2, ll_y, idx_down +
1, m_y - ll_y, drawtype, true, 0);
if (this.shadow !== 0 &&
(idx_left > 2 || idx_right > 2 || idx_down > 2 || idx_up > 2)) {
if (this.border !== 0) {
......
......@@ -77,7 +77,7 @@ class GrowCtx extends Rect {
a: GlowArray;
a_nc: GlowArray;
a_cc: GlowArray;
gdraw: GlowDraw;
gdraw: Draw;
constructor(ctx) {
super();
......@@ -90,7 +90,7 @@ class GrowCtx extends Rect {
if (ctx) {
this.gdraw = ctx.gdraw;
} else {
this.gdraw = new GlowDraw(this);
this.gdraw = new Draw(this);
}
}
......@@ -635,8 +635,8 @@ class GrowCtx extends Rect {
draw(t = null, highlight = 0, hot = 0, node = null, colornode = null) {
// Draw background color
this.gdraw.fill_rect(0, 0, this.gdraw.canvas.width,
this.gdraw.canvas.height, this.background_color);
this.gdraw.rect(0, 0, this.gdraw.canvas.width,
this.gdraw.canvas.height, this.background_color, true, 0);
// Draw connections
this.a.forEach(function (e) {
......
......@@ -443,9 +443,9 @@ class GrowFolder extends GrowWindow {
p[3].y = ll_y + h;
if (i === this.current_folder) {
this.ctx.gdraw.fill_polyline(p, 4, this.color_selected, 0);
this.ctx.gdraw.polyline(p, 4, this.color_selected, true, 0);
} else {
this.ctx.gdraw.fill_polyline(p, 4, this.color_unselected, 0);
this.ctx.gdraw.polyline(p, 4, this.color_unselected, true, 0);
if (this.shadow !== 0) {
this.ctx.gdraw.line(p[0].x + 1, p[0].y, p[1].x + 1, p[1].y,
drawtype_light, 0, 0);
......@@ -456,7 +456,7 @@ class GrowFolder extends GrowWindow {
new Point(x + h / 8, ll_y + h / 4),
new Point(x + h / 2, ll_y + h)];
this.ctx.gdraw.fill_polyline(ps, 4, drawtype_dark, 0);
this.ctx.gdraw.polyline(ps, 4, drawtype_dark, true, 0);
}
}
}
......@@ -471,12 +471,11 @@ class GrowFolder extends GrowWindow {
this.ctx.gdraw.line(p[1].x, p[1].y + 1, p[2].x, p[2].y + 1,
drawtype_light, 0, 0);
}
this.ctx.gdraw.polyline(p, 4, drawtype, idx, 0);
this.ctx.gdraw.polyline(p, 4, drawtype, false, idx);
if (text_idx >= 0 && this.folder_text[i] !== null) {
this.ctx.gdraw.text(x + h / 2, ll_y + h - 2, this.folder_text[i],
this.text_drawtype, this.text_color_drawtype, text_idx, highlight, 0,
Font.Helvetica, tsize, 0);
this.text_drawtype, this.text_color_drawtype, text_idx, highlight, Font.Helvetica, tsize, 0);
}
if (i === this.current_folder) {
break;
......
......@@ -151,7 +151,6 @@ class GrowImage extends Rect {
let ll_y = Math.min(y1, y2);
let ur_y = Math.max(y1, y2);
// this.ctx.gdraw.rect( ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, DrawType.Line, idx, 0);
this.ctx.gdraw.image(this.image, ll_x, ll_y, ur_x - ll_x, ur_y - ll_y);
}
......
......@@ -113,12 +113,7 @@ class GrowLine extends GlowLine {
GlowColor.get_drawtype(this.draw_type, DrawType.LineHighlight,
highlight, colornode, 0, 0);
if (this.line_type === LineType.Solid) {
this.ctx.gdraw.line(x1, y1, x2, y2, drawtype, idx, 0);
} else {
this.ctx.gdraw.line_dashed(x1, y1, x2, y2, drawtype, idx, 0,
this.line_type);
}
this.ctx.gdraw.line(x1, y1, x2, y2, drawtype, idx, 0, this.line_type);
}
get_borders(t, g) {
......
......@@ -67,8 +67,8 @@ class GrowMenu extends GrowRect {
this.item_cnt = 0;
this.info.item.forEach(function (e) {
if (e.occupied) {
let p = this.ctx.gdraw.getTextExtent(e.text,
Math.max(0, text_idx), this.font, this.text_drawtype);
let p = this.ctx.gdraw.getTextExtent(e.text, this.text_drawtype,
Math.max(0, text_idx), this.font);
z_width = p.x;
z_height = p.y;
z_descent = z_height / 4;
......@@ -119,8 +119,8 @@ class GrowMenu extends GrowRect {
this.get_node_borders();
if (this.fill !== 0) {
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
this.fill_drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
this.fill_drawtype, true, 0);
}
this.item_height = tot_z_height / this.item_cnt;
......@@ -135,17 +135,16 @@ class GrowMenu extends GrowRect {
} else {
drawtype = GlowColor.shift_drawtype(this.fill_drawtype, -2, null);
}
this.ctx.gdraw.fill_rect(ll_x,
Math.floor(ll_y + item_idx * this.item_height), ur_x - ll_x,
Math.floor(this.item_height), drawtype);
this.ctx.gdraw.rect(ll_x, Math.floor(ll_y + item_idx * this.item_height), ur_x - ll_x,
Math.floor(this.item_height), drawtype, true, 0);
}
let x_text = ll_x + 3;
if (e.type === MenuItem.ButtonDisabled) {
this.ctx.gdraw.text(x_text, y_text, e.text, this.text_drawtype,
this.text_color_disabled, text_idx, highlight, 0, this.font, tsize, 0);
this.text_color_disabled, text_idx, highlight, this.font, tsize, 0);
} else {
this.ctx.gdraw.text(x_text, y_text, e.text, this.text_drawtype,
this.text_color, text_idx, highlight, 0, this.font, tsize, 0);
this.text_color, text_idx, highlight, this.font, tsize, 0);
}
if (e.type === MenuItem.PulldownMenu) {
// Draw arrow
......@@ -159,14 +158,14 @@ class GrowMenu extends GrowRect {
new Point(ur_x - arrow_size - 2, Math.floor(ll_y + item_idx *
this.item_height + this.item_height / 2 - arrow_size / 2)),
];
this.ctx.gdraw.fill_polyline(p, 4, DrawType.MediumGray, 0);
this.ctx.gdraw.polyline(p, 4, DrawType.MediumGray, true, 0);
}
item_idx++;
}
});
if (this.border !== 0) {
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, this.draw_type,
idx, 0);
false, idx);
}
}
......
......@@ -216,8 +216,8 @@ class GrowPie extends GrowArc {
if (grad === Gradient.No || fillcolor === DrawType.ColorRed) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, ia1 - rot,
ia2, drawtype);
this.ctx.gdraw.arc(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, ia1 - rot,
ia2, drawtype, true, 0);
} else if (!display_shadow || this.shadow_width === 0) {
let f1, f2;
if (this.gradient_contrast >= 0) {
......
......@@ -287,8 +287,8 @@ class GrowPolyline extends GlowPolyline {
}
if (grad === Gradient.No || drawtype === DrawType.ColorRed) {
this.ctx.gdraw.fill_polyline(this.points, this.a_points.size(),
drawtype, 0);
this.ctx.gdraw.polyline(this.points, this.a_points.size(),
drawtype, true, 0);
} else {
let rotation = t ? this.trf.rot(t) : this.trf.rot();
......@@ -328,7 +328,7 @@ class GrowPolyline extends GlowPolyline {
sp[i + 1],
this.points[i + 1]
];
this.ctx.gdraw.fill_polyline(p, 4, sp[i].drawtype, 0);
this.ctx.gdraw.polyline(p, 4, sp[i].drawtype, true, 0);
}
}
}
......
......@@ -222,7 +222,7 @@ class GrowRect extends GlowRect {
new Point(ll_x, ur_y),
new Point(ll_x, ll_y)
];
this.ctx.gdraw.fill_polyline(points, 7, drawtype, 0);
this.ctx.gdraw.polyline(points, 7, drawtype, true, 0);
// Draw dark shadow
drawtype =
......@@ -237,14 +237,14 @@ class GrowRect extends GlowRect {
new Point(ur_x, ll_y),
new Point(ur_x, ur_y)
];
this.ctx.gdraw.fill_polyline(points, 7, drawtype, 0);
this.ctx.gdraw.polyline(points, 7, drawtype, true, 0);
}
if (this.fill !== 0) {
if (display_shadow && ish !== 0) {
if (grad === Gradient.No || fillcolor === DrawType.ColorRed) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_rect(ll_x + ish, ll_y + ish, ur_x - ll_x - 2 *
ish, ur_y - ll_y - 2 * ish, drawtype);
this.ctx.gdraw.rect(ll_x + ish, ll_y + ish, ur_x - ll_x - 2 *
ish, ur_y - ll_y - 2 * ish, drawtype, true, 0);
} else {
let rotationa = t ? this.trf.rot(t) : this.trf.rot();
......@@ -273,14 +273,13 @@ class GrowRect extends GlowRect {
fa0 = fillcolor;
}
this.ctx.gdraw.gradient_fill_rect(ll_x + ish, ll_y + ish, ur_x -
ll_x - 2 * ish, ur_y - ll_y - 2 * ish, fa0, fa1, fa2,
this.ctx.gdraw.gradient_rotate(rotationa, grad));
ll_x - 2 * ish, ur_y - ll_y - 2 * ish, fa0, fa1, fa2, this.ctx.gdraw.gradient_rotate(rotationa, grad));
}
} else {
if (grad === Gradient.No || fillcolor === DrawType.ColorRed) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype, true, 0);
} else {
let rotationb = t ? this.trf.rot(t) : this.trf.rot();
......@@ -309,8 +308,7 @@ class GrowRect extends GlowRect {
fb0 = fillcolor;
}
this.ctx.gdraw.gradient_fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y -
ll_y, fb0, fb1, fb2,
this.ctx.gdraw.gradient_rotate(rotationb, grad));
ll_y, fb0, fb1, fb2, this.ctx.gdraw.gradient_rotate(rotationb, grad));
}
}
}
......@@ -319,8 +317,7 @@ class GrowRect extends GlowRect {
let drawtype =
GlowColor.get_drawtype(this.draw_type, DrawType.LineHighlight,
highlight, colornode, 0, 0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx,
0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, false, idx);
}
}
......
......@@ -154,20 +154,20 @@ class GrowRectRounded extends GrowRect {
if (grad === Gradient.No) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
this.ctx.gdraw.fill_rect(ll_x, ll_y + amount, ur_x - ll_x, ur_y -
ll_y - 2 * amount, drawtype);
this.ctx.gdraw.fill_rect(ll_x + amount, ll_y, ur_x - ll_x - 2 *
amount, amount, drawtype);
this.ctx.gdraw.fill_rect(ll_x + amount, ur_y - amount, ur_x - ll_x -
2 * amount, amount, drawtype);
this.ctx.gdraw.fill_arc(ll_x, ll_y, 2 * amount, 2 * amount, 90, 90,
drawtype);
this.ctx.gdraw.fill_arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 *
amount, 180, 90, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount, ur_y - 2 * amount, 2 *
amount, 2 * amount, 270, 90, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 *
amount, 0, 90, drawtype);
this.ctx.gdraw.rect(ll_x, ll_y + amount, ur_x - ll_x, ur_y -
ll_y - 2 * amount, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x + amount, ll_y, ur_x - ll_x - 2 *
amount, amount, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x + amount, ur_y - amount, ur_x - ll_x -
2 * amount, amount, drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ll_y, 2 * amount, 2 * amount, 90, 90,
drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 *
amount, 180, 90, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount, ur_y - 2 * amount, 2 *
amount, 2 * amount, 270, 90, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 *
amount, 0, 90, drawtype, true, 0);
} else {
let rotationa = t ? this.trf.rot(t) : this.trf.rot();
......@@ -188,8 +188,7 @@ class GrowRectRounded extends GrowRect {
chot, null);
}
this.ctx.gdraw.gradient_fill_rectrounded(ll_x, ll_y, ur_x -
ll_x, ur_y - ll_y, amount, fillcolor, fa1, fa2,
this.ctx.gdraw.gradient_rotate(rotationa, grad));
ll_x, ur_y - ll_y, amount, fillcolor, fa1, fa2, this.ctx.gdraw.gradient_rotate(rotationa, grad));
}
} else {
let drawtype_incr = (this.relief === Relief.Down) ? -this.shadow_contrast : this.shadow_contrast;
......@@ -197,52 +196,52 @@ class GrowRectRounded extends GrowRect {
// Draw light shadow
let drawtype =
GlowColor.shift_drawtype(fillcolor, -drawtype_incr + chot, colornode);
this.ctx.gdraw.fill_rect(ll_x + amount, ll_y, ur_x - ll_x - 2 * amount,
ish, drawtype);
this.ctx.gdraw.fill_rect(ll_x, ll_y + amount, ish, ur_y - ll_y - 2 *
amount, drawtype);
this.ctx.gdraw.fill_arc(ll_x, ll_y, 2 * amount, 2 * amount, 90, 90,
drawtype);
this.ctx.gdraw.fill_arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 * amount,
180, 45, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 * amount,
45, 45, drawtype);
this.ctx.gdraw.rect(ll_x + amount, ll_y, ur_x - ll_x - 2 * amount,
ish, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x, ll_y + amount, ish, ur_y - ll_y - 2 *
amount, drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ll_y, 2 * amount, 2 * amount, 90, 90,
drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 * amount,
180, 45, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 * amount,
45, 45, drawtype, true, 0);
// Draw dark shadow
drawtype =
GlowColor.shift_drawtype(fillcolor, drawtype_incr + chot, colornode);
this.ctx.gdraw.fill_rect(ll_x + amount, ur_y - ish, ur_x - ll_x - 2 *
amount, ish, drawtype);
this.ctx.gdraw.fill_rect(ur_x - ish, ll_y + amount, ish, ur_y - ll_y -
2 * amount, drawtype);
this.ctx.gdraw.fill_arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 * amount,
225, 45, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 * amount,
0, 45, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount, ur_y - 2 * amount, 2 *
amount, 2 * amount, 270, 90, drawtype);
this.ctx.gdraw.rect(ll_x + amount, ur_y - ish, ur_x - ll_x - 2 *
amount, ish, drawtype, true, 0);
this.ctx.gdraw.rect(ur_x - ish, ll_y + amount, ish, ur_y - ll_y -
2 * amount, drawtype, true, 0);
this.ctx.gdraw.arc(ll_x, ur_y - 2 * amount, 2 * amount, 2 * amount,
225, 45, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount, ll_y, 2 * amount, 2 * amount,
0, 45, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount, ur_y - 2 * amount, 2 *
amount, 2 * amount, 270, 90, drawtype, true, 0);
if (grad === Gradient.No) {
let drawtype = (chot === 0) ? fillcolor : GlowColor.shift_drawtype(fillcolor, chot, null);
if (amount > ish) {
this.ctx.gdraw.fill_rect(ll_x + ish, ll_y + amount, ur_x - ll_x -
2 * ish, ur_y - ll_y - 2 * amount, drawtype);
this.ctx.gdraw.fill_rect(ll_x + amount, ll_y + ish, ur_x - ll_x -
2 * amount, amount - ish, drawtype);
this.ctx.gdraw.fill_rect(ll_x + amount, ur_y - amount, ur_x - ll_x -
2 * amount, amount - ish, drawtype);
this.ctx.gdraw.fill_arc(ll_x + ish, ll_y + ish, 2 * amount - 2 *
ish, 2 * amount - 2 * ish, 90, 90, drawtype);
this.ctx.gdraw.fill_arc(ll_x + ish, ur_y - 2 * amount + ish, 2 *
amount - 2 * ish, 2 * amount - 2 * ish, 180, 90, drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount + ish, ur_y - 2 * amount +
this.ctx.gdraw.rect(ll_x + ish, ll_y + amount, ur_x - ll_x -
2 * ish, ur_y - ll_y - 2 * amount, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x + amount, ll_y + ish, ur_x - ll_x -
2 * amount, amount - ish, drawtype, true, 0);
this.ctx.gdraw.rect(ll_x + amount, ur_y - amount, ur_x - ll_x -
2 * amount, amount - ish, drawtype, true, 0);
this.ctx.gdraw.arc(ll_x + ish, ll_y + ish, 2 * amount - 2 *
ish, 2 * amount - 2 * ish, 90, 90, drawtype, true, 0);
this.ctx.gdraw.arc(ll_x + ish, ur_y - 2 * amount + ish, 2 *
amount - 2 * ish, 2 * amount - 2 * ish, 180, 90, drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount + ish, ur_y - 2 * amount +
ish, 2 * amount - 2 * ish, 2 * amount - 2 * ish, 270, 90,
drawtype);
this.ctx.gdraw.fill_arc(ur_x - 2 * amount + ish, ll_y + ish, 2 *
amount - 2 * ish, 2 * amount - 2 * ish, 0, 90, drawtype);
drawtype, true, 0);
this.ctx.gdraw.arc(ur_x - 2 * amount + ish, ll_y + ish, 2 *
amount - 2 * ish, 2 * amount - 2 * ish, 0, 90, drawtype, true, 0);
} else {
this.ctx.gdraw.fill_rect(ll_x + amount, ll_y + amount, ur_x - ll_x -
2 * amount, ur_y - ll_y - 2 * amount, drawtype);
this.ctx.gdraw.rect(ll_x + amount, ll_y + amount, ur_x - ll_x -
2 * amount, ur_y - ll_y - 2 * amount, drawtype, true, 0);
}
} else {
let rotationb = t ? this.trf.rot(t) : this.trf.rot();
......@@ -265,8 +264,7 @@ class GrowRectRounded extends GrowRect {
}
this.ctx.gdraw.gradient_fill_rectrounded(ll_x + ish, ll_y +
ish, ur_x - ll_x - 2 * ish, ur_y - ll_y - 2 * ish, amount - ish,
fillcolor, fb1, fb2,
this.ctx.gdraw.gradient_rotate(rotationb, grad));
fillcolor, fb1, fb2, this.ctx.gdraw.gradient_rotate(rotationb, grad));
}
}
}
......
......@@ -68,7 +68,7 @@ class GrowScrollBar extends GrowRect {
DrawType.LineHighlight, highlight, colornode, 0, 0);
let shift_drawtype;
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, fdrawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, fdrawtype, true, 0);
if (this.shadow !== 0) {
shift_drawtype = GlowColor.shift_drawtype(this.fill_drawtype, 2, null); // Dark
this.ctx.gdraw.line(ll_x + 1, ll_y + 1, ll_x + 1, ur_y - 1,
......@@ -106,7 +106,7 @@ class GrowScrollBar extends GrowRect {
y0 = ll_y;
break;
}
this.ctx.gdraw.fill_rect(x0, y0, width, height, this.bar_color);
this.ctx.gdraw.rect(x0, y0, width, height, this.bar_color, true, 0);
if (this.shadow !== 0) {
shift_drawtype = GlowColor.shift_drawtype(this.bar_color, -2, null); // Light
this.ctx.gdraw.line(x0 + 1, y0 + 1, x0 + 1, y0 + height - 1,
......@@ -119,11 +119,10 @@ class GrowScrollBar extends GrowRect {
this.ctx.gdraw.line(x0 + width - 1, y0 + 1, x0 + width - 1, y0 +
height - 1, shift_drawtype, 0, 0);
}
this.ctx.gdraw.rect(x0, y0, width, height, bdrawtype, idx, 0);
this.ctx.gdraw.rect(x0, y0, width, height, bdrawtype, false, idx);
}
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, bdrawtype, idx,
0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, bdrawtype, false, idx);
}
set_value(value, length) {
......
......@@ -465,8 +465,8 @@ class GrowTable extends GrowRect {
if (this.header_row !== 0) {
if (this.fill !== 0) {
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, header_h,
this.fill_drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, header_h,
this.fill_drawtype, true, 0);
}
this.ctx.gdraw.set_clip_rectangle(ll_x + header_w, ll_y, ur_x, ll_y +
......@@ -511,7 +511,7 @@ class GrowTable extends GrowRect {
this.ctx.gdraw.text(Math.floor(x + text_offs),
Math.floor(y + header_h - 4), this.header_text[i],
this.header_text_drawtype, this.header_text_color, header_text_idx,
highlight, 0, this.font, header_tsize, 0);
highlight, this.font, header_tsize, 0);
}
x += this.column_width[i] * this.ctx.mw.zoom_factor_x;
if (x > ur_x) {
......@@ -534,7 +534,7 @@ class GrowTable extends GrowRect {
this.ctx.gdraw.line(ll_x + header_w, ll_y, ll_x + header_w, ll_y +
header_h, drawtype, idx, 0);
}
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, header_h, drawtype, idx, 0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, header_h, drawtype, false, idx);
if (this.header_column !== 0) {
// Draw header of header column header
......@@ -543,15 +543,15 @@ class GrowTable extends GrowRect {
this.ctx.gdraw.text(Math.floor(x + text_offs),
Math.floor(y + header_h - 4), this.header_text[0],
this.header_text_drawtype, this.header_text_color, header_text_idx,
highlight, 0, this.font, tsize, 0);
highlight, this.font, tsize, 0);
}
}
}
if (this.header_column !== 0) {
if (this.fill !== 0) {
this.ctx.gdraw.fill_rect(ll_x, ll_y + header_h, header_w, ur_y - ll_y -
header_h, this.fill_drawtype);
this.ctx.gdraw.rect(ll_x, ll_y + header_h, header_w, ur_y - ll_y -
header_h, this.fill_drawtype, true, 0);
}
this.ctx.gdraw.set_clip_rectangle(ll_x, ll_y + header_h, ll_x + header_w,
......@@ -562,9 +562,9 @@ class GrowTable extends GrowRect {
let x = ll_x;
let y = t_ll_y + this.row_height * this.ctx.mw.zoom_factor_y *
this.selected_cell_row;
this.ctx.gdraw.fill_rect(Math.floor(x), Math.floor(y), header_w,
this.ctx.gdraw.rect(Math.floor(x), Math.floor(y), header_w,
Math.floor(this.row_height * this.ctx.mw.zoom_factor_y),
sel_drawtype);
sel_drawtype, true, 0);
}
if (this.shadow !== 0) {
......@@ -610,8 +610,7 @@ class GrowTable extends GrowRect {
if (this.column_adjustment[0] === Adjustment.Right ||
this.column_adjustment[0] === Adjustment.Center) {
let width, height, descent;
let p = this.ctx.gdraw.getTextExtent(this.cell_value[offs],
text_idx, this.font, this.text_drawtype);
let p = this.ctx.gdraw.getTextExtent(this.cell_value[offs], this.text_drawtype, text_idx, this.font);
width = p.x;
height = p.y;
descent = height / 4;
......@@ -629,20 +628,20 @@ class GrowTable extends GrowRect {
}
this.ctx.gdraw.text(text_x, Math.floor(y - 5),
this.cell_value[offs], this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0, this.font,
this.text_color_drawtype, text_idx, highlight, this.font,
tsize, 0);
}
}
}
this.ctx.gdraw.reset_clip_rectangle();
this.ctx.gdraw.rect(ll_x, ll_y + header_h - 1, header_w, ur_y - ll_y -
header_h + 1, drawtype, idx, 0);
header_h + 1, drawtype, false, idx);
}
// Draw table
if (this.fill !== 0) {
this.ctx.gdraw.fill_rect(o_ll_x, o_ll_y, o_ur_x - o_ll_x, o_ur_y - o_ll_y,
this.fill_drawtype);
this.ctx.gdraw.rect(o_ll_x, o_ll_y, o_ur_x - o_ll_x, o_ur_y - o_ll_y,
this.fill_drawtype, true, 0);
}
this.ctx.gdraw.set_clip_rectangle(o_ll_x, o_ll_y, o_ur_x, o_ur_y);
......@@ -656,11 +655,11 @@ class GrowTable extends GrowRect {
}
let y = t_ll_y + this.row_height * this.ctx.mw.zoom_factor_y *
this.selected_cell_row;
this.ctx.gdraw.fill_rect(Math.floor(x), Math.floor(y),
this.ctx.gdraw.rect(Math.floor(x), Math.floor(y),
Math.floor(this.column_width[this.selected_cell_column] *
this.ctx.mw.zoom_factor_x),
Math.floor(this.row_height * this.ctx.mw.zoom_factor_y),
sel_drawtype);
sel_drawtype, true, 0);
}
if (this.shadow !== 0) {
......@@ -768,8 +767,7 @@ class GrowTable extends GrowRect {
if (this.column_adjustment[i] === Adjustment.Right ||
this.column_adjustment[i] === Adjustment.Center) {
let width, height, descent;
let p = this.ctx.gdraw.getTextExtent(this.cell_value[offs],
text_idx, this.font, this.text_drawtype);
let p = this.ctx.gdraw.getTextExtent(this.cell_value[offs], this.text_drawtype, text_idx, this.font);
width = p.x;
height = p.y;
descent = height / 4;
......@@ -791,7 +789,7 @@ class GrowTable extends GrowRect {
this.ctx.gdraw.text(text_x, Math.floor(y - 5),
this.cell_value[offs], this.text_drawtype,
this.text_color_drawtype, text_idx, highlight, 0, this.font,
this.text_color_drawtype, text_idx, highlight, this.font,
tsize, 0);
}
}
......@@ -805,7 +803,7 @@ class GrowTable extends GrowRect {
// Draw frame
this.ctx.gdraw.rect(o_ll_x, o_ll_y, ur_x - o_ll_x, ur_y - o_ll_y, drawtype,
idx, 0);
false, idx);
if (this.input_focus !== 0) {
this.ctx.gdraw.line(ll_x - 2, ll_y - 2, ll_x - 2, ur_y + 2,
DrawType.DarkGray, 0, 0);
......
......@@ -122,8 +122,8 @@ class GrowText extends GlowText {
if (this.text !== "") {
if (highl !== 0 || (hot !== 0 && node === null) ||
this.adjustment !== Adjustment.Left) {
let p = this.ctx.gdraw.getTextExtent(this.text, Math.max(0, idx),
lfont, ldraw_type);
let p = this.ctx.gdraw.getTextExtent(this.text, ldraw_type, Math.max(0, idx),
lfont);
z_width = p.x;
z_height = p.y;
z_descent = z_height / 4;
......@@ -165,26 +165,25 @@ class GrowText extends GlowText {
}
if (highl !== 0) {
this.ctx.gdraw.rect(rx1, ry1, z_width, z_height,
DrawType.FillHighlight, Math.max(1, Math.min(idx + hot, 2)), 0);
this.ctx.gdraw.rect(rx1, ry1, z_width, z_height, DrawType.FillHighlight,
false, Math.max(1, Math.min(idx + hot, 2)));
} else if (hot !== 0 && node === null) {
this.ctx.gdraw.rect(rx1, ry1, z_width, z_height,
DrawType.LineGray, Math.max(Math.min(idx, 2), 1), 0);
this.ctx.gdraw.rect(rx1, ry1, z_width, z_height, DrawType.LineGray,
false, Math.max(Math.min(idx, 2), 1));
}
if (idx >= 0) {
let color = GlowColor.get_drawtype(this.color_drawtype,
DrawType.LineHighlight, highlight, colornode, 2, 0);
this.ctx.gdraw.text(x1, y1, this.text, ldraw_type, color, idx,
highlight, 0, lfont, tsize, rot);
highlight, lfont, tsize, rot);
}
} else if (idx >= 0) {
let p2 = this.ctx.gdraw.getTextExtent("A", Math.max(0, idx), lfont,
ldraw_type);
let p2 = this.ctx.gdraw.getTextExtent("A", ldraw_type, Math.max(0, idx), lfont);
z_width = p2.x;
z_height = p2.y;
z_descent = z_height / 4;
this.ctx.gdraw.rect(x1, y1 - (z_height - z_descent), z_width, z_height,
DrawType.LineGray, idx, 0);
DrawType.LineGray, false, idx);
}
}
......
......@@ -183,8 +183,8 @@ class GrowTrend extends GrowRect {
GlowColor.get_drawtype(this.fill_drawtype, DrawType.FillHighlight,
highlight, colornode, 1, 0);
if (grad === Gradient.No) {
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
drawtype, true, 0);
} else {
let rotation = t ? this.trf.rot(t) : this.trf.rot();
......@@ -297,8 +297,7 @@ class GrowTrend extends GrowRect {
}
if (this.border !== 0) {
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx,
0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, false, idx);
}
}
......
......@@ -180,8 +180,8 @@ class GrowWindow extends GrowRect {
// window_ctx->draw_buffer_only = ctx->draw_buffer_only;
if (this.fill !== 0) {
this.ctx.gdraw.fill_rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
this.fill_drawtype);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y,
this.fill_drawtype, true, 0);
}
this.ctx.gdraw.set_clip_rectangle(ll_x, ll_y, ur_x - 1, ur_y - 1);
......@@ -203,7 +203,7 @@ class GrowWindow extends GrowRect {
let drawtype =
GlowColor.get_drawtype(this.draw_type, DrawType.LineHighlight,
highlight, colornode, 0, 0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, idx, 0);
this.ctx.gdraw.rect(ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, drawtype, false, idx);
}
new_ctx() {
......
......@@ -22,8 +22,8 @@
</div>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="crypt.ts"></script>
<script type="text/babel" src="pwr.js"></script>
<script type="text/babel" src="gdh.js"></script>
<script type="text/babel" src="pwr.ts"></script>
<script type="text/babel" src="gdh.ts"></script>
<script type="text/babel" src="opwind.ts"></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
......@@ -34,10 +34,11 @@
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel" src="pwr.js"></script>
<script type="text/babel" src="cli.js"></script>
<script type="text/babel" src="gdh.js"></script>
<script type="text/babel" src="plow.js"></script>
<script type="text/babel" src="pwr.ts"></script>
<script type="text/babel" src="cli.ts"></script>
<script type="text/babel" src="gdh.ts"></script>
<script type="text/babel" src="draw.ts"></script>
<script type="text/babel" src="plow.ts"></script>
<script type="text/babel" src="xtt.ts"></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment