// Returns a new canvas object. func New() *Canvas { cv := &Canvas{} cv.Init() cv.wand = C.NewMagickWand() cv.fg = C.NewPixelWand() cv.bg = C.NewPixelWand() cv.fill = C.NewPixelWand() cv.stroke = C.NewPixelWand() cv.drawing = C.NewDrawingWand() //cv.SetColor("#ffffff") cv.SetBackgroundColor("none") cv.SetStrokeColor("#ffffff") cv.SetStrokeAntialias(true) cv.SetStrokeWidth(1.0) cv.SetStrokeOpacity(1.0) cv.SetStrokeLineCap(STROKE_ROUND_CAP) cv.SetStrokeLineJoin(STROKE_ROUND_JOIN) //cv.SetFillRule(FILL_EVEN_ODD_RULE) cv.SetFillColor("#888888") return cv }
// Returns a new canvas object. func New() *Canvas { self := &Canvas{} self.wand = C.NewMagickWand() self.drawing = C.NewDrawingWand() self.fg = C.NewPixelWand() self.bg = C.NewPixelWand() self.fill = C.NewPixelWand() self.stroke = C.NewPixelWand() self.SetBackgroundColor("none") self.SetStrokeColor("#ffffff") //self.SetStrokeAntialias(true) //self.SetStrokeWidth(1.0) //self.SetStrokeOpacity(1.0) //self.SetStrokeLineCap(STROKE_ROUND_CAP) //self.SetStrokeLineJoin(STROKE_ROUND_JOIN) self.SetFillColor("#000000") return self }
// Returns a new canvas object. func New() *Canvas { self := &Canvas{} self.wand = C.NewMagickWand() self.fg = C.NewPixelWand() self.bg = C.NewPixelWand() self.fill = C.NewPixelWand() self.stroke = C.NewPixelWand() self.drawing = C.NewDrawingWand() //self.SetColor("#ffffff") self.SetBackgroundColor("none") self.SetStrokeColor("#ffffff") self.SetStrokeAntialias(true) self.SetStrokeWidth(1.0) self.SetStrokeOpacity(1.0) self.SetStrokeLineCap(STROKE_ROUND_CAP) self.SetStrokeLineJoin(STROKE_ROUND_JOIN) //self.SetFillRule(FILL_EVEN_ODD_RULE) self.SetFillColor("#888888") self.text = self.NewTextProperties(true) return self }
// Returns a drawing wand required for all other methods in the API. func NewDrawingWand() *DrawingWand { return &DrawingWand{C.NewDrawingWand()} }