Click here to Skip to main content
16,014,869 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to view (use) XIFF files? Pin
2-Feb-01 6:39
suss2-Feb-01 6:39 
Generalvariable template parameter Pin
2-Feb-01 2:59
suss2-Feb-01 2:59 
QuestionWinLogon notification? Pin
Mathias Tunared2-Feb-01 1:54
Mathias Tunared2-Feb-01 1:54 
AnswerRe: WinLogon notification? Pin
3-Feb-01 12:42
suss3-Feb-01 12:42 
GeneralRe: WinLogon notification? Pin
Mathias Tunared4-Feb-01 21:50
Mathias Tunared4-Feb-01 21:50 
GeneralGood Ad-ware System Pin
Colin J Davies1-Feb-01 23:25
Colin J Davies1-Feb-01 23:25 
QuestionHow do they do anti-alias ??? Pin
Danoo1-Feb-01 20:21
Danoo1-Feb-01 20:21 
AnswerRe: How do they do anti-alias ??? Pin
Chris Losinger2-Feb-01 4:23
professionalChris Losinger2-Feb-01 4:23 
anti-aliasing is simple in theory:

your drawing algorithm tells you to draw a white (RGB(255,255,255)) pixel at (5.2, 10.4). but because you can't draw pixel at fractional locations, you have to distribute the "white" to the pixels closest to the ideal location.

here's an easy way to do this:

1. pick the four pixels closest to your ideal pixel. if (5.2, 10.4) is your target, choose : (5, 10), (6, 10), (5, 11) , (6, 11)

2. for each of those, find the distance to the ideal pixel (use the simple 2D distance formula d^2 = deltaX^2 + deltaY^2. for the first pixel, the distance is sqrt(0.2^2 + 0.4^2).

3. based on the distance, blend a percentage of the "white" with the color of the current pixel.

4. repeat for every pixel you need to draw.

yes, this will be incredibly slow if you do this with GetPixel and SetPixel.

-c
GeneralATL Com progamming - needed help !!! Pin
1-Feb-01 18:52
suss1-Feb-01 18:52 
GeneralDebugging VB COM Components from a C++ Client Pin
Chris Paulse1-Feb-01 16:49
Chris Paulse1-Feb-01 16:49 
GeneralRe: Debugging VB COM Components from a C++ Client Pin
Chris Paulse2-Feb-01 15:32
Chris Paulse2-Feb-01 15:32 
GeneralThe old mouse recorder Pin
1-Feb-01 12:53
suss1-Feb-01 12:53 
GeneralRe: The old mouse recorder Pin
Michael Dunn1-Feb-01 13:14
sitebuilderMichael Dunn1-Feb-01 13:14 
GeneralRe: The old mouse recorder Pin
1-Feb-01 14:07
suss1-Feb-01 14:07 
GeneralCRichEditCtrl and rotation Pin
AlexMarbus1-Feb-01 12:31
AlexMarbus1-Feb-01 12:31 
QuestionThe following code looses memory. What's wrong? Pin
1-Feb-01 10:16
suss1-Feb-01 10:16 
AnswerRe: The following code looses memory. What's wrong? Pin
1-Feb-01 10:48
suss1-Feb-01 10:48 
GeneralMDI application Pin
kk91-Feb-01 9:18
kk91-Feb-01 9:18 
GeneralBuilding DLL's with mutual dependencies Pin
1-Feb-01 7:57
suss1-Feb-01 7:57 
GeneralMDI application Pin
kk91-Feb-01 6:35
kk91-Feb-01 6:35 
GeneralControls... Pin
1-Feb-01 6:00
suss1-Feb-01 6:00 
GeneralRe: Controls... Pin
David Fedolfi1-Feb-01 6:51
David Fedolfi1-Feb-01 6:51 
Generalabout callback Pin
1-Feb-01 5:10
suss1-Feb-01 5:10 
GeneralCapturing LPT output from DOS application Pin
Mody_CZ1-Feb-01 3:12
Mody_CZ1-Feb-01 3:12 
Generalfunction call within timer-callback Pin
.::RockNix::.1-Feb-01 1:08
.::RockNix::.1-Feb-01 1:08 

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.