realbasic-nug
[Top] [All Lists]

Re: why would this crash?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: why would this crash?
From: Chirometrics <chirometrics at accsoft dot com dot au>
Date: Fri, 04 Jul 2003 19:56:59 +1000
Hello Chris,
     I have had some woes in previous versions of RB where some pictures did
not come with graphics objects.  They seemed to be PICTs or BMPs and perhaps
others that I did not experiment with.
     You may wish to try the following:-

function makeAUsefulPic (source as picture) as picture
  dim p as picture
  dim picWidth, picHeight,screenDepth as integer

  screenDepth = screen(0).depth
  picWidth = source.width
  picHeight = source.height
  
  'make source off-screen pic because
  'PICTs and BMPs don't have graphics property!
  
  p = newPicture(picWidth, picHeight,screenDepth)
  p.graphics.drawPicture source,0,0
  return p
end function
  
If you pass the picture of interest to this function, then access the
graphics property of the result, you may have better luck.
regards
Tony Barry
chirometrics AT accsoft DOT com DOT au


---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>

Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
.


<Prev in Thread] Current Thread [Next in Thread>