[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

obsolete[LuaStudio] test u8:/resource

ContributionURL := 'http://u8.smalltalking.net/u8/profile/felipe.zak/556/' !

! Bitmap class methodsFor: #samples !
twoImagesExample
	" Two images example "
	
	| target data bmp |
	target := Display stage.

	data := BitmapData @ 'u8:/Image.jpg' "'/assets/Image.jpg'".
	bmp := (Bitmap 
		bitmapData: data 
		pixelSnapping: PixelSnapping auto
		smoothing: false)
		alpha: 0.5; x: 0; y: 0; 
		yourself.
	self print: 'bmp height=', bmp height.
	self print: 'bmp width=', bmp width.
	bmp width: bmp width * ((Capabilities screenResolutionX / 2) / bmp width).
	bmp height: bmp height * ((Capabilities screenResolutionY) / bmp height).
	target addChild: bmp. 

! !

" BitmapData pathName: 'u8:/Image.jpg' "!

 Bitmap twoImagesExample !

" self print: ( BitmapData mustExist: 'u8:/Image.jpg' ) " !

" BitmapData pathName: 'u8:/Image.jpg' " !