Thursday, 19 October 2017

QBasic - Screen 12

  • Place QB64 in your onedrive




This will be your first line of Code: 

SCREEN 12
This is graphics mode: 640 x 480 with 16 colours
or
SCREEN 13
This is graphics mode: 320 x 200 with 256 colours

********do*************these***************
** LINK   QBasic Tutorials Series 28 -38   LINK **

******draw***a****picture***after ***each****
https://www.youtube.com/watch?v=Jo3bLrkmveI






color 0   'black


Color Chart
  0        Black   4           Red  8                    Gray   12              Light Red 
  1     Blue  5    Magenta   9           Light Blue  13       Light Magenta
  2       Green  6       Brown  10   Light Green  14                   Yellow
  3     Cyan  7     white  11      Light Cyan  15         Bright White

CLS         'clear screen   also good to start with
SLEEP     ' will run until you hit a key

CIRCLE (x,y), radius, color

example:    circle (100,250),75,4   'a red circle

PAINT(x,y), paint color, border color

example: paint (100,250),1,4  'paint the colour blue in the inside of a red object

Ellipse     uses the circle and a ratio

circle (x,y), radius, color, , , ratio (height/width)      - the commas are important

example:  circle (300,300),100, 14, , , 2/5   'width flat yellow ellipse

                 circle (500,400),60, 6, , , 3/2   'tall thin brown ellipse

Arc  use the circle, radians and a ratio

circle (x,y),radius, color, start angle, end angle, ratio (height/width)

example: circle (50,50),200,5,0,3.14,1/2  ' top half of magenta circle
   
                circle (150,150),100,3,3.14,6.26,1/2  ' bottom half of cyan circle

LINE (x1,y1)-(x2,y2),color    'points at either end of a line

Example:  LINE (20,20)-(50,50), 10  ' a light green line between 2 points

Box  uses the line tool

LINE (50,50)-(200,200), 11, B   'B creates a light cyan empty box from the line coordinates

LINE (100,100)-(300,300),12,BF  ' BF creates a light red FILLED box no edge color




first post:  your best version of this image (along with the code)
- first line will be your blog address
- comments are a must
- make a link to your .bas file in your OneDrive






No comments:

Post a Comment

Exit Interview

Exit Interview You have reached the end of the course.  Some assignments you may have enjoyed while others ... Question 1: Which assig...