OT: Math help

  • Thread starter Thread starter Joseph D. DeJohn
  • Start date Start date
J

Joseph D. DeJohn

Just divide the width of the page by 2. Then divide the width of the image
by 2. Then subtract the length of half of the image from the length of half
of the page. This should give you your starting x coordinate. Same thing
for the height. I'm assuming that the coordinate system for the image (0,0)
is at the top left of the image. Hope that helps.
 
Hi all, I have a small math problem I am hoping someone can help me with.

Basically I have to align an image in the middle of a page but I have to
specify the left coordinate for the image.

I know the width of the page as well as the width of the image so I just
need to work out how far in from the left of the page to specify the image
starting point so the image is aligned in the center.

Help appreciated :)

Cheers
Mark
 
Back
Top