The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: reh052965 on April 25, 2005, 05:38:16 AM

Title: Scaling/stretching
Post by: reh052965 on April 25, 2005, 05:38:16 AM
I hope someone can point me in the right direction on this one. I am sure most are familiar with programs having a splitter bar, or something of the sort, between a region above the bar and a region below the bar. When the user clicks and drags the horizontal splitter bar up or down the primitive graphics above and below the splitter bar are scaled based on the direction the splitter bar is being dragged, up or down.

I prefer not to use blitting if that is at all possible. Watching how rapidly some of these programs can redraw these regions amazes me and now I would like to do this myself.

Any help is appreciated...
Title: Re: Scaling/stretching
Post by: Tedd on April 25, 2005, 10:00:20 AM
I think blitting is the fastest way :P
The problem some people have is that they forget to unset the background clearing on repaint - which means you get a nice flicker :bdg
Title: Re: Scaling/stretching
Post by: Phoenix on April 25, 2005, 08:01:20 PM
Hi reh052965,

perhaps this tutorial written by Ernest Murphy is something you might be interested in:

http://ourworld.compuserve.com/homepages/ernies_world/split1.htm (http://ourworld.compuserve.com/homepages/ernies_world/split1.htm)

He explains how to write a splitter bar control...

Regards,
Phoenix

Title: Re: Scaling/stretching
Post by: reh052965 on April 26, 2005, 11:34:19 PM
Excellent site; however, I am already at that level in my coding  :8). I will try to explain what I am trying to do and, as far as I know, bit blitting may be the only way.

I have two child windows both displaying graphics. The child windows are seperated by a horizontal splitter bar. The graphics in the upper and lower windows are updated every five seconds and the entire graphic must scroll horizontally every five minutes and the graphics must change dynamically to reflect this. Now, I would like to be able to grab the splitter bar, drag it up or down and have the graphics scale vertically to the new size of the child window dimensions the respective graphic is drawn in.

I hope that makes sense...