How can we shift the Origin from the Top-Left corner to the Center of screen in [TEX]Turbo C Graphics Programming[/TEX]?

Recommended Answers

I am not familiar with "turbo C graphic" stuff, but are you using graphics.h by any chance?

Jump to Post

All 3 Replies

I am not familiar with "turbo C graphic" stuff, but are you using graphics.h by any chance?

Yes , I am using graphics.h . And, i don't know how to shift te origin from the top left corner to the center of the screen . It's very very urgent for me right now, any sort of help would be highly obliged.

Find the coordinates of the center of the screen and add that to your current point. So if the center was at 50,50 and you had a point at 10,10 it would now be at 60,60 in your coordinate system.
I don't know much if anything about the graphics.h system (as it's older than some of the people posting here) but it seems that a majority systems have this upper left corner = (0,0) orientation, the programmer just has to deal with it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.