Click here to Skip to main content
15,881,172 members
Home / Discussions / Graphics
   

Graphics

 
AnswerRe: PNG vs JPG Pin
Peter_in_278011-Sep-14 20:51
professionalPeter_in_278011-Sep-14 20:51 
AnswerRe: PNG vs JPG Pin
Pete O'Hanlon11-Sep-14 21:01
mvePete O'Hanlon11-Sep-14 21:01 
AnswerRe: PNG vs JPG Pin
Chris Losinger2-Dec-14 4:31
professionalChris Losinger2-Dec-14 4:31 
QuestionBezier Curve issue Pin
pvpeng4-Jul-14 4:16
pvpeng4-Jul-14 4:16 
QuestionRe: Bezier Curve issue Pin
Richard Deeming4-Jul-14 4:39
mveRichard Deeming4-Jul-14 4:39 
AnswerRe: Bezier Curve issue Pin
Richard MacCutchan4-Jul-14 5:53
mveRichard MacCutchan4-Jul-14 5:53 
AnswerRe: Bezier Curve issue Pin
Bernhard Hiller13-Jul-14 21:58
Bernhard Hiller13-Jul-14 21:58 
QuestionHelp calculating a perpendicular line end point. Pin
Austin_Cpp28-Jun-14 10:58
Austin_Cpp28-Jun-14 10:58 
I am working in C++. I am trying to draw a perpendicular hash mark from the start of a sloped line. My code below draws a perpendicular line but when the slope of the original line changes the hash mark appears to change length. When the line is close to horizontal the hash mark looks longest and shortest when the line is close to vertical. I believe the problem is the fixed value for HashLength. Can you show a better way to calculate the end of the perpendicular line(px2,py2) so my hash mark always looks the same size.


C#
//(x1,y1)(x2,y2) //original Line
//(x1,y1)(px1,px2) //Perpendicular Line

Orig_Line_Slope = (y1-y2)/(x1-x2);
Recipical_Slope = ((1.0 / Orig_Line_Slope)*-1);

HashLength = 10.0;

px2 = (x1+HashLength);
py2 = (y1+(Orig_Line_Slope*HashLength));

MoveToEx(hdc, x1, y1, NULL);
LineTo(hdc, px2, py2 );

AnswerRe: Help calculating a perpendicular line end point. Pin
Yang Kok Wah29-Jun-14 0:33
Yang Kok Wah29-Jun-14 0:33 
GeneralRe: Help calculating a perpendicular line end point. Pin
Austin_Cpp1-Jul-14 18:41
Austin_Cpp1-Jul-14 18:41 
QuestionHow to write glutSwapBuffers() in SharpGL format? Pin
pvpeng27-Jun-14 11:05
pvpeng27-Jun-14 11:05 
QuestionSharpGL: how to add a solid object to a scene Pin
Member 1075894613-Jun-14 10:31
Member 1075894613-Jun-14 10:31 
AnswerRe: SharpGL: how to add a solid object to a scene Pin
Richard MacCutchan13-Jun-14 21:40
mveRichard MacCutchan13-Jun-14 21:40 
QuestionHow to make a font height equal to "tmHeight"? Pin
transoft12-Jun-14 9:02
transoft12-Jun-14 9:02 
AnswerRe: How to make a font height equal to "tmHeight"? Pin
Eddy Vluggen12-Jun-14 10:25
professionalEddy Vluggen12-Jun-14 10:25 
GeneralRe: How to make a font height equal to "tmHeight"? Pin
transoft12-Jun-14 11:00
transoft12-Jun-14 11:00 
GeneralRe: How to make a font height equal to "tmHeight"? Pin
Eddy Vluggen13-Jun-14 2:59
professionalEddy Vluggen13-Jun-14 2:59 
GeneralRe: How to make a font height equal to "tmHeight"? Pin
jinzai17-Jul-14 14:01
jinzai17-Jul-14 14:01 
QuestionNeeded: Printing Tutorial for GDI+ screen to Single Page Pin
Austin_Cpp29-May-14 11:23
Austin_Cpp29-May-14 11:23 
AnswerRe: Needed: Printing Tutorial for GDI+ screen to Single Page Pin
Richard MacCutchan29-May-14 22:17
mveRichard MacCutchan29-May-14 22:17 
GeneralRe: Needed: Printing Tutorial for GDI+ screen to Single Page Pin
Austin_Cpp29-May-14 23:33
Austin_Cpp29-May-14 23:33 
GeneralRe: Needed: Printing Tutorial for GDI+ screen to Single Page Pin
Richard MacCutchan30-May-14 21:54
mveRichard MacCutchan30-May-14 21:54 
AnswerRe: Needed: Printing Tutorial for GDI+ screen to Single Page Pin
Eddy Vluggen12-Jun-14 10:28
professionalEddy Vluggen12-Jun-14 10:28 
QuestionLoading 3D model from file Pin
MrDooDoo13-May-14 10:33
MrDooDoo13-May-14 10:33 
AnswerRe: Loading 3D model from file Pin
Pete O'Hanlon13-May-14 11:14
mvePete O'Hanlon13-May-14 11: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.