Skip to content

Can't scale an image #186

Open
Open
@hirrolot

Description

@hirrolot

I can't figure out how to scale an image. No matter which x, y parameters I feed to Scale, this method seems to be a no-op.

package main

import "github.com/fogleman/gg"

func main() {
    dc := gg.NewContext(1000, 1000)
    dc.DrawCircle(500, 500, 400)
    dc.SetRGB(0, 0, 0)
    dc.Fill()
    dc.Scale(10, 10)
    dc.SavePNG("out.png")
}

Maybe I've forgotten to call some other method that performs actual scaling?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions