Link to home
Start Free TrialLog in
Avatar of khansaquib
khansaquibFlag for Australia

asked on

graphics programming

i need the lines of code for the following algorithms.

flat fill
body fill
ellipse
morphing
scaling
rotation
translation
Avatar of Mayank S
Mayank S
Flag of India image

This is not a homework site.
+ you did not give us much information on how to help you

what language ?
....
..
.
Graphics Programming in .... ? (C/C++/VC++ or others)
Avatar of khansaquib

ASKER

c or c++
Avatar of mmusante
mmusante

Translation :
x1 = x + xt
y1 = y + yt

Scaling :
x1 = (x-x0)*fx + x0
y1 = (y-y0)*fy + y0

where (x,y) = original point
          (x1,y1) = new point
          (x0,y0) = scaling center point
          fx, fy = scaling factors
          xt, yt = translation offsets
ASKER CERTIFIED SOLUTION
Avatar of mmusante
mmusante

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
'Hi

Ive made the code in VB and its working well. Thanx for your help. I want this question to be closed.
You said that you want to do this in C/ C++. So the experts gave you help for that. Then you said that you did it in VB. That's not the correct thing to say, is it? You should've told us initially, that a VB solution was also fine with you.