Scanline + make life a little easier for yourself!

BlitzPlus Forums/BlitzPlus Programming/Scanline + make life a little easier for yourself!

Mr Brine(Posted 2004) [#1]
Hi All

- ScanLine? Ive never been able to figure out what this command is for? Just out of intrest has anybody ever found any use for this command?

- Oh yeah I kept meaning to mention this but I always forgot: Make life a little easier for yourself. Add this line of html to the begining of the blitzplus\index.html

<script>window.location.replace("commands/index.htm")</script>

now when ever you click on the home button and when blitz + loads it should magicly redirect you to the command index help page. I find this much better then having to goto to the homepage then click on the approriate link.

If anybody else has put this info on the blitz forums, then I aint seen it :-)

Also dont know if this l'll work with blitz 2d/3d

njoi

Mr Brine


soja(Posted 2004) [#2]
Scanline() returns the integer index of the scanline that is currently being redrawn on your screen. (A scanline is the horizontal row of pixels from the left to the right of your monitor, and are usually numbered from top to bottom of your screen, from 0 to your resolution height.)

Try this simple little program to see a demo. It reports your approximate vertical resolution and your approximate refresh rate.

sc_low = ScanLine()
sc_high = sc_low
Repeat
	s% = ScanLine()
	If s < sc_low Then sc_low = s
	If s > sc_high Then sc_high = s
	If s = sc_high Then 
		Print (1000.0 / Float (MilliSecs() - oldtime)) + " Hz (" + sc_low + "," + sc_high + ")"
		oldtime% = MilliSecs()
	EndIf
Forever