Click here to Skip to main content
15,907,326 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: Extracting specific image from tiff... Pin
PandemoniumPasha9-Mar-07 0:44
PandemoniumPasha9-Mar-07 0:44 
GeneralRe: Extracting specific image from tiff... Pin
Mogtabam10-Mar-07 21:07
Mogtabam10-Mar-07 21:07 
GeneralRe: Extracting specific image from tiff... Pin
Mark Salsbery11-Mar-07 9:16
Mark Salsbery11-Mar-07 9:16 
QuestionManaged DirectX DeviceResizing Pin
Dmitri Nеstеruk6-Mar-07 4:07
Dmitri Nеstеruk6-Mar-07 4:07 
QuestionMax Rectangles In Any Shape Pin
zbaum002-Mar-07 11:49
zbaum002-Mar-07 11:49 
AnswerRe: Max Rectangles In Any Shape Pin
John R. Shaw3-Mar-07 0:36
John R. Shaw3-Mar-07 0:36 
GeneralRe: Max Rectangles In Any Shape Pin
zbaum004-Mar-07 10:38
zbaum004-Mar-07 10:38 
GeneralRe: Max Rectangles In Any Shape Pin
John R. Shaw9-Mar-07 8:35
John R. Shaw9-Mar-07 8:35 
I am afraid that I misplaced the original source code; I may have lost it, as I can only find an older version of my library. The code was originally an experiment in clipping lines to an elliptical/circle and I never generalized it for any convex shape, although I had planed too at a latter date. What I did was break the ‘Cohen-Sutherland Line-Clipping Algorithm’ (Computer Graphics Principles and Practice, Foley et al., pp. 113-117) into a series of small inline functions, so I could pick and choose the pieces required; in this case I was only interested in the corners. Given that and a list of the horizontal lines, I was able to clip all drawing done by my old graphics library to the elliptical shape as if it was a clipping rectangle. I suspect that there are faster ways to do it, but I have not thought of, nor seen, another way to do it.

If you overlay a copy of the ‘Cohen-Sutherland region outcodes’ diagram over the shape with the clipping rectangles corners touching the edges, you will see the idea behind what I was doing. Example: draw the diagram and then draw a circle around it so that the edge passes through the four corners of the clipping rectangle and you will see why I only considered the corners.

Good Luck!

INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

AnswerRe: Max Rectangles In Any Shape Pin
Shog99-Mar-07 11:21
sitebuilderShog99-Mar-07 11:21 
QuestionHow to Connect DV Video Encoder to FileWriter Pin
Brooks Harris2-Mar-07 11:18
Brooks Harris2-Mar-07 11:18 
AnswerRe: How to Connect DV Video Encoder to FileWriter Pin
Mark Salsbery2-Mar-07 12:52
Mark Salsbery2-Mar-07 12:52 
GeneralRe: How to Connect DV Video Encoder to FileWriter Pin
Brooks Harris3-Mar-07 3:58
Brooks Harris3-Mar-07 3:58 
QuestionGDI+ Region::IsVisible() Pin
Mark Salsbery2-Mar-07 8:23
Mark Salsbery2-Mar-07 8:23 
AnswerRe: GDI+ Region::IsVisible() Pin
cmk2-Mar-07 10:44
cmk2-Mar-07 10:44 
GeneralRe: GDI+ Region::IsVisible() Pin
Mark Salsbery2-Mar-07 10:49
Mark Salsbery2-Mar-07 10:49 
GeneralRe: GDI+ Region::IsVisible() Pin
cmk2-Mar-07 10:56
cmk2-Mar-07 10:56 
GeneralRe: GDI+ Region::IsVisible() Pin
Mark Salsbery2-Mar-07 11:08
Mark Salsbery2-Mar-07 11:08 
QuestionHow can I find the exact colors of a grayscaled picture? Pin
JUNEYT1-Mar-07 9:16
JUNEYT1-Mar-07 9:16 
AnswerRe: How can I find the exact colors of a grayscaled picture? Pin
Mark Salsbery1-Mar-07 9:28
Mark Salsbery1-Mar-07 9:28 
AnswerRe: How can I find the exact colors of a grayscaled picture? Pin
El Corazon1-Mar-07 10:20
El Corazon1-Mar-07 10:20 
GeneralRe: How can I find the exact colors of a grayscaled picture? Pin
Mark Salsbery1-Mar-07 11:27
Mark Salsbery1-Mar-07 11:27 
GeneralRe: How can I find the exact colors of a grayscaled picture? Pin
El Corazon1-Mar-07 11:58
El Corazon1-Mar-07 11:58 
GeneralRe: How can I find the exact colors of a grayscaled picture? Pin
Mark Salsbery1-Mar-07 12:02
Mark Salsbery1-Mar-07 12:02 
GeneralRe: How can I find the exact colors of a grayscaled picture? Pin
El Corazon1-Mar-07 12:04
El Corazon1-Mar-07 12:04 
GeneralRe: How can I find the exact colors of a grayscaled picture? Pin
Mark Salsbery1-Mar-07 12:14
Mark Salsbery1-Mar-07 12:14 

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.