Barcode implementations also implements BarcodeColor interface
This commit is contained in:
parent
49d4ce8a5b
commit
d5743d95af
|
@ -32,6 +32,10 @@ func (c *aztecCode) ColorModel() color.Model {
|
|||
return c.color.Model
|
||||
}
|
||||
|
||||
func (c *aztecCode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (c *aztecCode) Bounds() image.Rectangle {
|
||||
return image.Rect(0, 0, c.size, c.size)
|
||||
}
|
||||
|
|
|
@ -35,6 +35,10 @@ func (c *datamatrixCode) ColorModel() color.Model {
|
|||
return c.color.Model
|
||||
}
|
||||
|
||||
func (c *datamatrixCode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (c *datamatrixCode) Bounds() image.Rectangle {
|
||||
return image.Rect(0, 0, c.Columns, c.Rows)
|
||||
}
|
||||
|
|
|
@ -27,6 +27,10 @@ func (c *pdfBarcode) ColorModel() color.Model {
|
|||
return c.color.Model
|
||||
}
|
||||
|
||||
func (c *pdfBarcode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (c *pdfBarcode) Bounds() image.Rectangle {
|
||||
height := c.code.Len() / c.width
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@ func (qr *qrcode) ColorModel() color.Model {
|
|||
return qr.color.Model
|
||||
}
|
||||
|
||||
func (c *qrcode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (qr *qrcode) Bounds() image.Rectangle {
|
||||
return image.Rect(0, 0, qr.dimension, qr.dimension)
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@ func (c *base1DCode) ColorModel() color.Model {
|
|||
return c.color.Model
|
||||
}
|
||||
|
||||
func (c *base1DCode) ColorScheme() barcode.ColorScheme {
|
||||
return c.color
|
||||
}
|
||||
|
||||
func (c *base1DCode) Bounds() image.Rectangle {
|
||||
return image.Rect(0, 0, c.Len(), 1)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue