• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Half-page Position Slider - Feedback wanted
#12
Stick your code in a routine (rather than embedding it); this will allow you to easily experiment with different solutions.

I forgot to say that, when moving a visible XOred line, you just XOR it again to restore the original line. Then perform an XOR at the new position.
This means there is no need to "remember what is under the line"
Putting it in a routine means that your code is still simple to read as it will just be one call.

The overhead should be minimal as you are probably only going to be accessing about 1000 pixels per pixel row (2 accesses per pixel - one read, one write)

On windows there are techniques for accessing pixels on a raster basis (this is faster) but as you need a generic mechanism for different platforms, I suggest you access the pixels individually

This is only a possible suggestion - you know your code and any limitations due to the different drawing mechanisms.

Geoff
Samsung Galaxy Tab A6
Reply


Messages In This Thread
RE: Half-page Position Slider - Feedback wanted - by Geoff Bacon - 02-26-2023, 05:51 AM



Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.