Login  Register

Re: Canvas: Transform Width and Height Independently

Posted by Sean P. DeNigris on Feb 21, 2015; 3:40am
URL: https://forum.world.st/Canvas-Transform-Width-and-Height-Independently-tp4806749p4806765.html

Nicolai Hess wrote
You can create a new Form... warpblt into this form...
Ah, thanks. That worked. It became:
    drawOn: aCanvas

        | tempForm |
        tempForm := Form extent: self innerBounds extent depth: self image depth.
        (WarpBlt current toForm: tempForm)
                sourceForm: self image destRect: tempForm relativeRectangle;
                combinationRule: Form paint;
                cellSize: 1;
                warpBits.
        aCanvas drawImage: tempForm at: self innerBounds origin
Cheers,
Sean