|
|
@ -358,9 +358,9 @@ var CanvasExtraState = (function CanvasExtraStateClosure() { |
|
|
|
this.textRenderingMode = TextRenderingMode.FILL; |
|
|
|
this.textRenderingMode = TextRenderingMode.FILL; |
|
|
|
this.textRise = 0; |
|
|
|
this.textRise = 0; |
|
|
|
// Color spaces
|
|
|
|
// Color spaces
|
|
|
|
this.fillColorSpace = new DeviceGrayCS(); |
|
|
|
this.fillColorSpace = ColorSpace.singletons.gray; |
|
|
|
this.fillColorSpaceObj = null; |
|
|
|
this.fillColorSpaceObj = null; |
|
|
|
this.strokeColorSpace = new DeviceGrayCS(); |
|
|
|
this.strokeColorSpace = ColorSpace.singletons.gray; |
|
|
|
this.strokeColorSpaceObj = null; |
|
|
|
this.strokeColorSpaceObj = null; |
|
|
|
this.fillColorObj = null; |
|
|
|
this.fillColorObj = null; |
|
|
|
this.strokeColorObj = null; |
|
|
|
this.strokeColorObj = null; |
|
|
@ -1354,8 +1354,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
setStrokeGray: function CanvasGraphics_setStrokeGray(gray) { |
|
|
|
setStrokeGray: function CanvasGraphics_setStrokeGray(gray) { |
|
|
|
if (!(this.current.strokeColorSpace instanceof DeviceGrayCS)) |
|
|
|
this.current.strokeColorSpace = ColorSpace.singletons.gray; |
|
|
|
this.current.strokeColorSpace = new DeviceGrayCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0); |
|
|
|
var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
@ -1363,8 +1362,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
this.current.strokeColor = color; |
|
|
|
this.current.strokeColor = color; |
|
|
|
}, |
|
|
|
}, |
|
|
|
setFillGray: function CanvasGraphics_setFillGray(gray) { |
|
|
|
setFillGray: function CanvasGraphics_setFillGray(gray) { |
|
|
|
if (!(this.current.fillColorSpace instanceof DeviceGrayCS)) |
|
|
|
this.current.fillColorSpace = ColorSpace.singletons.gray; |
|
|
|
this.current.fillColorSpace = new DeviceGrayCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0); |
|
|
|
var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
@ -1372,8 +1370,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
this.current.fillColor = color; |
|
|
|
this.current.fillColor = color; |
|
|
|
}, |
|
|
|
}, |
|
|
|
setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) { |
|
|
|
setStrokeRGBColor: function CanvasGraphics_setStrokeRGBColor(r, g, b) { |
|
|
|
if (!(this.current.strokeColorSpace instanceof DeviceRgbCS)) |
|
|
|
this.current.strokeColorSpace = ColorSpace.singletons.rgb; |
|
|
|
this.current.strokeColorSpace = new DeviceRgbCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0); |
|
|
|
var rgbColor = this.current.strokeColorSpace.getRgb(arguments, 0); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
@ -1381,8 +1378,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
this.current.strokeColor = color; |
|
|
|
this.current.strokeColor = color; |
|
|
|
}, |
|
|
|
}, |
|
|
|
setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) { |
|
|
|
setFillRGBColor: function CanvasGraphics_setFillRGBColor(r, g, b) { |
|
|
|
if (!(this.current.fillColorSpace instanceof DeviceRgbCS)) |
|
|
|
this.current.fillColorSpace = ColorSpace.singletons.rgb; |
|
|
|
this.current.fillColorSpace = new DeviceRgbCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0); |
|
|
|
var rgbColor = this.current.fillColorSpace.getRgb(arguments, 0); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
|
var color = Util.makeCssRgb(rgbColor); |
|
|
@ -1390,16 +1386,14 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
this.current.fillColor = color; |
|
|
|
this.current.fillColor = color; |
|
|
|
}, |
|
|
|
}, |
|
|
|
setStrokeCMYKColor: function CanvasGraphics_setStrokeCMYKColor(c, m, y, k) { |
|
|
|
setStrokeCMYKColor: function CanvasGraphics_setStrokeCMYKColor(c, m, y, k) { |
|
|
|
if (!(this.current.strokeColorSpace instanceof DeviceCmykCS)) |
|
|
|
this.current.strokeColorSpace = ColorSpace.singletons.cmyk; |
|
|
|
this.current.strokeColorSpace = new DeviceCmykCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var color = Util.makeCssCmyk(arguments); |
|
|
|
var color = Util.makeCssCmyk(arguments); |
|
|
|
this.ctx.strokeStyle = color; |
|
|
|
this.ctx.strokeStyle = color; |
|
|
|
this.current.strokeColor = color; |
|
|
|
this.current.strokeColor = color; |
|
|
|
}, |
|
|
|
}, |
|
|
|
setFillCMYKColor: function CanvasGraphics_setFillCMYKColor(c, m, y, k) { |
|
|
|
setFillCMYKColor: function CanvasGraphics_setFillCMYKColor(c, m, y, k) { |
|
|
|
if (!(this.current.fillColorSpace instanceof DeviceCmykCS)) |
|
|
|
this.current.fillColorSpace = ColorSpace.singletons.cmyk; |
|
|
|
this.current.fillColorSpace = new DeviceCmykCS(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var color = Util.makeCssCmyk(arguments); |
|
|
|
var color = Util.makeCssCmyk(arguments); |
|
|
|
this.ctx.fillStyle = color; |
|
|
|
this.ctx.fillStyle = color; |
|
|
|