Closed ccworld1000 closed 5 years ago
Not scaling the context.
displaying an image at a different size from the actual pixel data is achieved by changing the scale of the context, then drawing the image. Check out the clip example (and just ignore the clipping) to see how to combine scaling and drawing an image: https://cairographics.org/samples/clip_image/
If you want the result to be another surface/image (sorry, i'm not quite sure about my cairo terminology) you can render onto a new image instead of the screen (or what have you) and use the result of that later
The scene I encounter now is to draw multiple pictures at the same time in a context.
If I want to load the pictures of 512512, which methods can achieve the desired effect and want to be displayed as 256256?
Actually, I want to zoom in on the loaded pictures, but the corresponding "class Image" does not seem to want the method.