Click here to Skip to main content
15,911,785 members
Home / Discussions / Graphics
   

Graphics

 
GeneralControlStyles.DoubleBuffer Issue Pin
Harvey Saayman7-Mar-08 2:12
Harvey Saayman7-Mar-08 2:12 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Luc Pattyn7-Mar-08 2:20
sitebuilderLuc Pattyn7-Mar-08 2:20 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Harvey Saayman9-Mar-08 20:23
Harvey Saayman9-Mar-08 20:23 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Luc Pattyn10-Mar-08 0:51
sitebuilderLuc Pattyn10-Mar-08 0:51 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Harvey Saayman10-Mar-08 1:22
Harvey Saayman10-Mar-08 1:22 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Martin#12-Mar-08 3:43
Martin#12-Mar-08 3:43 
Questiondrawing in a rectangle? Pin
Harvey Saayman6-Mar-08 3:35
Harvey Saayman6-Mar-08 3:35 
GeneralRe: drawing in a rectangle? Pin
Luc Pattyn6-Mar-08 8:00
sitebuilderLuc Pattyn6-Mar-08 8:00 
Hi,

a Graphics object performs clipping, normally to the borders of the applicable Control.
e.g. if you have a Panel, its OnPaint will provide a Graphics object with the clip region
set to correspond to the Panel's size.

You can reduce the drawable area by:
1. setting a smaller clip region
2. choose a smaller Control

I typically prefer 2, hence I add a Panel that gets the size I want my OnPaint to handle.

you were not very specific, the above assumes a .NET environment, and a rectangle with
horizontal and vertical edges (not a rotated one).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


modified on Friday, March 7, 2008 5:58 AM

GeneralRe: drawing in a rectangle? Pin
Harvey Saayman6-Mar-08 19:43
Harvey Saayman6-Mar-08 19:43 
GeneralRe: drawing in a rectangle? Pin
Harvey Saayman6-Mar-08 22:57
Harvey Saayman6-Mar-08 22:57 
GeneralRe: drawing in a rectangle? Pin
Luc Pattyn7-Mar-08 0:07
sitebuilderLuc Pattyn7-Mar-08 0:07 
GeneralRe: drawing in a rectangle? Pin
Harvey Saayman7-Mar-08 0:54
Harvey Saayman7-Mar-08 0:54 
Generalthis.CreateGraphics() Issue Pin
Harvey Saayman5-Mar-08 21:32
Harvey Saayman5-Mar-08 21:32 
GeneralRe: this.CreateGraphics() Issue Pin
Tim Craig5-Mar-08 22:33
Tim Craig5-Mar-08 22:33 
GeneralRe: this.CreateGraphics() Issue Pin
Mark Salsbery6-Mar-08 6:06
Mark Salsbery6-Mar-08 6:06 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 19:45
Harvey Saayman6-Mar-08 19:45 
GeneralRe: this.CreateGraphics() Issue Pin
Luc Pattyn6-Mar-08 7:01
sitebuilderLuc Pattyn6-Mar-08 7:01 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 19:48
Harvey Saayman6-Mar-08 19:48 
GeneralRe: this.CreateGraphics() Issue Pin
Christian Graus6-Mar-08 20:49
protectorChristian Graus6-Mar-08 20:49 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 20:55
Harvey Saayman6-Mar-08 20:55 
GeneralRe: this.CreateGraphics() Issue Pin
Christian Graus6-Mar-08 21:29
protectorChristian Graus6-Mar-08 21:29 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 21:43
Harvey Saayman6-Mar-08 21:43 
GeneralPush mode/Pull mode Pin
Sugantha5-Mar-08 19:55
Sugantha5-Mar-08 19:55 
GeneralRe: Push mode/Pull mode Pin
Mark Salsbery6-Mar-08 5:59
Mark Salsbery6-Mar-08 5:59 
Generalrendering video Pin
jossion4-Mar-08 19:16
jossion4-Mar-08 19:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.