|
|
|
Junior Member
      
Group: Forum Members
Last Login: 9/20/2007 11:00:34 AM
Posts: 11,
Visits: 25
|
|
Hello,
Although I can successfully run the animated red car sample included on the Canvas.Copy help page, I can't get a transparent background to work in my case, where I'm using a MovieDisplay object to do the drawing. I basically do this in an inline after the MovieDisplay has finished:
set arrowCanvas = Display.CreateCanvas
arrowCanvas.LoadImage "RedCar.bmp"
arrowCanvas.SourceColorKey = CColor("0,0,0")
Display.Canvas.Copy arrowCanvas, arrowSrcRect, arrowDstRect, ebEffectSourceColorKey
The background (that I was hoping to be transparent) turns out white.
Any ideas?
Thanks,
Shane
|
|
|
|
|
Forum MVP
      
Group: Administrators
Last Login: 2 days ago @ 8:55:28 AM
Posts: 536,
Visits: 1,158
|
|
| Because you mentioned that you are using a MovieDisplay, the action you are attempting to perform may not be supported. To provide real time support for Movies, E-Prime must render movie frames separately in hardware video memory. For this to function, movie objects get their own Z-Order (http://en.wikipedia.org/wiki/Zorder) that is placed on top of the Z-Order of other objects being presented. Thus, movie objects will always appear on top of the screen and not part of the Display.Canvas. Therefore, when you perform the source color key you are doing so via what is under the movie frame being presented. The other reason this is done is to ensure proper display/rendering. For example, if a movie were playing when PreReleased into a ImageDiplay object that was transparent, it would render its contents based on the frame that was currently on display (which would likely be well prior to its onset). At onset time, the display would then draw inaccurate results. PST will investigate efforts to include a closer relationship between the Canvas object and movie stimuli. -Brandon
|
|
|
|