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 » Community » Newbie corner » Display transparent paper
Re: Display transparent paper [message #58052 is a reply to message #58051] Sun, 30 January 2022 18:14 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 656
Registered: March 2007
Contributor
Silvan:

Dig a little into Upp source code, I find something like this
void Display::PaintBackground(Draw& w, const Rect& r, const Value& q,
                              Color ink, Color paper, dword style) const
{
	if(IsType<AttrText>(q)) {
		const AttrText& t = ValueTo<AttrText>(q);
		if(!IsNull(t.paper))
			paper = t.paper;
		if(!IsNull(t.normalpaper) && !(style & (CURSOR|SELECT|READONLY)))
			paper = t.normalpaper;
	}
	w.DrawRect(r, paper);
}

void Display::Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const
{
	PaintBackground(w, r, q, ink, paper, style);
	Single<StdDisplayClass>().Paint0(w, r, q, ink, paper, style);
}


Do you want to try set both paper for AttrText and the Paint parameter to Null and see if you get what you want. Obviously when you set the paper color of AttrText to Null, then the paper color of passed in parameter to funciton Display::Paint will be used. I am not quite sure if set it to Null will make a do nothing DrawRect. I think its the only reasonable result, but before actually test it, I cannot really tell for sure.

HTH,
Lance
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Generic questions about graphic
Next Topic: Synchronize to Github
Goto Forum:
  


Current Time: Tue Apr 29 16:19:43 CEST 2025

Total time taken to generate the page: 0.01130 seconds