Jump to content
  • Advertisement
  • entries
    222
  • comments
    606
  • views
    592238

Clipped graphics and ellipses

Sign in to follow this  
benryves

1006 views

qarnos -- author of the superb Aether 3D engine -- has been lending a hand with the BBC BASIC graphics API and contributed a large amount of very useful code.


First up is some code to clip 16-bit line coordinates down to 8-bit coordinates. This allows for lines to be partially (or completely) off the screen.


He's also written a fast ellipse drawing and filling routine. The ellipses are also clipped to the viewport and are filled with an 8x8 pixel pattern.


The graphics viewport can be redefined using the VDU 24,left;top;right;bottom; command as demonstrated in the above example.


GCOL can also be used to set a plotting mode; either plotting the specified colour directly, performing a logical operation (OR, AND, EOR) or inverting the existing colour.


All but the last of the above screenshots are the result of running BBC BASIC on a TI-83+ SE at 15MHz. The final screenshot is running at the regular 6MHz.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!