Author | 
 Topic: Copying rectangles..  (Read 527 times) | 
 
 
 | 
 
 
afarlie
 New Member
 
  member is offline
  
 
  
    
    
  
Posts: 18 
 | 
  | 
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 » | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
admin
 Administrator
 
  member is offline
  
 
  
    
    
  
Posts: 1145 
 | 
  | 
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.
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
afarlie
 New Member
 
  member is offline
  
 
  
    
    
  
Posts: 18 
 | 
  | 
Re: Copying rectangles.. 
« Reply #2 on: Oct 9th, 2013, 5:30pm » | 
 | 
 
 
 
on Oct 9th, 2013, 3:06pm, Richard Russell  wrote:
  Problem solved.
  BTW I will check the first example for sillies.. 
  
 | 
 
 | 
  Logged
 | 
               
             
            
             
             | 
           
         
         | 
       
     
     | 
   
 
 
 |