Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Showing bitmaps or Icons
Re: Showing bitmaps or Icons [message #2502 is a reply to message #117] Sat, 15 April 2006 13:20 Go to previous messageGo to previous message
gprentice is currently offline  gprentice
Messages: 260
Registered: November 2005
Location: New Zealand
Experienced Member
Is the code below valid - it seems to work?
gp1 is the name of a bitmap in an .iml file, just like Smiley() in the reference/iml example. What does img1 = gp1() do - does img1 store a copy of the bitmap?

GUI_APP_MAIN
{
	App w;
	Label l1;
	Image img1;
	
	w.Add(l1);
	l1.SetPos(l1.PosLeft(10, 100), l1.PosTop(10, 30));	
	img1= gp1();
	l1.SetImage(img1);
	w.Run();
}


In the iml example there is
w.DrawImage((sz.cx - isz.cx) / 2, (sz.cy - isz.cy) / 2, Smiley());


What does "Smiley()" do here - does it get the "address" of the Smiley bitmap that has been embedded in the app due to the iml file being part of the project?


Graeme

BTW - in the reference/events example, the Log("Paint") in the Paint function causes continuous events ... I can't remember if this was originally a commented line and I uncommented it myself or not.

[Updated on: Sun, 16 April 2006 11:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image with Layout (iml) painted red, why?
Next Topic: When I added "Draw" package to my project (605dev1), I get "plugin\z" added...
Goto Forum:
  


Current Time: Fri May 17 03:04:50 CEST 2024

Total time taken to generate the page: 0.02691 seconds