How to copy all the pixels in a circle in a BITMAP image and paste it to another location in the image?

I am trying to copy an area (circle) onto an image in another part of the image. (As shown below)

Image example

Something like CopyRect . The only difference is the form.

+5
source share
1 answer
  • Create a clipping region (CreateEllipticRgn here, CombineRgn for more complex shapes)
  • Select it ( SelectClipRgn ) in the context of the target device (Canvas.handle).
  • Copy the rectangle containing the desired fragment. Parts outside the clip area remain unchanged.
  • Delete clipping area
+10
source

Source: https://habr.com/ru/post/1267104/


All Articles