Results 1 to 2 of 2

Thread: Copy an Ellipse from a Bitmap (Solved)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2013
    Location
    Earth
    Posts
    230

    Copy an Ellipse from a Bitmap (Solved)

    Hi all!

    How can you copy an elliptical shape off of a bitmap? I already know that you can copy a rectangular shape, but is it possible to do this?

    Thanks!
    Nic

    vb Code:
    1. Public Class Form1
    2.  
    3.     Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    4.  
    5.         Dim Bmp As New Bitmap(My.Resources.background)
    6.         Dim srcRect As New Rectangle(120, 20, 120, 120)
    7.  
    8.         'e.Graphics.DrawImage(Bmp, ClientRectangle, srcRect, GraphicsUnit.Pixel)
    9.  
    10.         e.Graphics.DrawImage(Bmp, 0, 0)
    11.         e.Graphics.DrawEllipse(Pens.Red, srcRect)
    12.  
    13.     End Sub
    14.  
    15. End Class
    Last edited by NinjaNic; Dec 5th, 2015 at 04:30 PM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Dec 2013
    Location
    Earth
    Posts
    230

    Re: Copy an Ellipse from a Bitmap

    Nevermind - this is solved. I will post the code as soon as I refine it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width