Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Bitmap Clipping

Bitmap Clipping

Scheduled Pinned Locked Moved C#
graphicstutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    free_soul424
    wrote on last edited by
    #1

    Hi, I am try to clip the invisible area of a bit map. I have tried the following code. 1.Bitmap bmp = new Bitmap(100, 100); // create a bitmap 2.Graphics bmpG = Graphics.FromImage(bmp); // graphics handler to bitmap 3.bmpG.DrawRectangle(new Pen(Color.Blue), new Rectangle(1000, 1000, 99, 99)); Notice line 3, it allow me to draw the rectangle beyond the bitmap. The size of bitmap is 100 X 100 and I have drawn a rectangle at the location 1000, 1000. In think the device contexts automatically manage it. My question is that can I see the region that is not visible. Actually I want to clip the region in which my rectangle is situated. And want to show it when the user scroll. Please guide me I will b thankful. Regards,

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups