BBC BASIC for Windows
« Copying rectangles.. »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:10pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Copying rectangles..  (Read 527 times)
afarlie
New Member
Image


member is offline

Avatar




PM


Posts: 18
xx Copying rectangles..
« Thread started on: Oct 9th, 2013, 2:43pm »

First the example code.
10 VDU 23,22,640;480;8,8,16,0
CLS
20 REM DATA
30 MOVE 0,0
40 GCOL 0,1

50 ORIGIN 0,(1024)
60 MOVE 0,0
70 DRAW 99,-99
80
RECTANGLE 0,-99,99,99 TO 100,-200:REM Block copy 100 by 100
RECTANGLE 0,-99,99,99 TO 200,-300

The line should be continuous, with start points being
0,-100 ; 100,-200 ; 200,-300 respectively

The documentation does not say that in block copy operations the dx dy are 'inclusive' or exclusive.

Perhaps someone here would be willing to explain?



« Last Edit: Oct 9th, 2013, 5:31pm by afarlie » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Copying rectangles..
« Reply #1 on: Oct 9th, 2013, 3:06pm »

on Oct 9th, 2013, 2:43pm, afarlie wrote:
The documentation does not say that in block copy operations the dx dy are 'inclusive' or exclusive.

This section of the documentation says that graphics coordinates of a solid rectangle are inclusive of the left and top edges and exclusive of the right and bottom edges:

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin3.html#pixelsolid

Try changing all the 99's in your program to 100 and see if that gives the results you want.

If not, ask again.

Richard.
User IP Logged

afarlie
New Member
Image


member is offline

Avatar




PM


Posts: 18
xx Re: Copying rectangles..
« Reply #2 on: Oct 9th, 2013, 5:30pm »

on Oct 9th, 2013, 3:06pm, Richard Russell wrote:
This section of the documentation says that graphics coordinates of a solid rectangle are inclusive of the left and top edges and exclusive of the right and bottom edges:

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin3.html#pixelsolid

Richard.


Problem solved.

BTW I will check the first example for sillies..smiley

User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls