@barcode-bakery/barcode-common
Advanced tools
Comparing version 3.0.0-alpha.5 to 3.0.0-alpha.6
@@ -45,3 +45,3 @@ var O = Object.defineProperty; | ||
} | ||
function A(o, t) { | ||
function C(o, t) { | ||
o.context.fillStyle = "rgb(" + t.r + ", " + t.g + ", " + t.b + ")"; | ||
@@ -104,3 +104,3 @@ } | ||
safeSubstring: H, | ||
setColor: A, | ||
setColor: C, | ||
setFont: v, | ||
@@ -128,9 +128,9 @@ strRepeat: P, | ||
function y(o, t, s, e) { | ||
A(o, e), o.context.fillRect(0, 0, o.context.canvas.width, o.context.canvas.height); | ||
C(o, e), o.context.fillRect(0, 0, o.context.canvas.width, o.context.canvas.height); | ||
} | ||
function u(o, t, s, e, i, n) { | ||
A(o, n), o.context.fillRect(t, s, e - t + 1, i - s + 1); | ||
C(o, n), o.context.fillRect(t, s, e - t + 1, i - s + 1); | ||
} | ||
function G(o, t, s, e, i) { | ||
o.context.beginPath(), o.context.ellipse(t, s, e, e, 0, 0, 2 * Math.PI, !1), A(o, i), o.context.fill(); | ||
o.context.beginPath(), o.context.ellipse(t, s, e, e, 0, 0, 2 * Math.PI, !1), C(o, i), o.context.fill(); | ||
} | ||
@@ -290,3 +290,3 @@ function D(o, t, s, e) { | ||
} | ||
class C { | ||
class A { | ||
/** | ||
@@ -391,3 +391,3 @@ * Constructor. | ||
const i = this.getDrawingPosition(t.createSurface, s, e); | ||
v(t, this.font, this.size), A(t, this.foregroundColor.allocate(t)), t.context.save(), t.context.translate(i[0], i[1]); | ||
v(t, this.font, this.size), C(t, this.foregroundColor.allocate(t)), t.context.save(), t.context.translate(i[0], i[1]); | ||
const n = this.getRotationAngle(); | ||
@@ -408,3 +408,3 @@ t.context.rotate(-n * Math.PI / 180), t.context.fillText(this.text, 0, 0), t.context.restore(); | ||
clone() { | ||
return new C(this.font, this.size); | ||
return new A(this.font, this.size); | ||
} | ||
@@ -422,3 +422,3 @@ } | ||
constructor(t = "", s = null, e = l.Position.Bottom, i = l.Alignment.Center) { | ||
r(this, "font", new C("Arial", 12)); | ||
r(this, "font", new A("Arial", 12)); | ||
r(this, "text", ""); | ||
@@ -684,3 +684,3 @@ r(this, "position", l.Position.Bottom); | ||
setBackgroundColor(t) { | ||
t instanceof g ? this.colorBg = t : this.colorBg = new g(t); | ||
this.isInstanceOfBCGColor(t) ? this.colorBg = t : this.colorBg = new g(t); | ||
for (const s of this.labels) | ||
@@ -967,3 +967,3 @@ s.setBackgroundColor(this.colorBg); | ||
*/ | ||
r(this, "font", new C("Arial", 8)); | ||
r(this, "font", new A("Arial", 8)); | ||
/** | ||
@@ -1442,3 +1442,3 @@ * The text to parse. | ||
this.prepareSurface(f, n, h); | ||
const a = new C("Arial", 14); | ||
const a = new A("Arial", 14); | ||
a.setText(s), a.setRotationAngle(this.getRotationAngle()), a.draw(f, 0, 0); | ||
@@ -1476,3 +1476,3 @@ } | ||
B as BCGDrawing, | ||
C as BCGFont, | ||
A as BCGFont, | ||
l as BCGLabel, | ||
@@ -1479,0 +1479,0 @@ ft as BCGParseException, |
{ | ||
"name": "@barcode-bakery/barcode-common", | ||
"version": "3.0.0-alpha.5", | ||
"version": "3.0.0-alpha.6", | ||
"description": "Base code for generating barcode with the Barcode Bakery library. See barcode-bakery-1d.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94920