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   |
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
|
|
|
 |
|
Display transparent paper
By: Silvan on Sat, 29 January 2022 20:38
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 00:09
|
 |
|
Re: Display transparent paper
By: Silvan on Sun, 30 January 2022 09:34
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 18:14
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 18:20
|
 |
|
Re: Display transparent paper
By: Silvan on Sun, 30 January 2022 19:15
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 23:17
|
 |
|
Re: Display transparent paper
By: Lance on Sun, 30 January 2022 23:23
|
 |
|
Re: Display transparent paper
By: Silvan on Mon, 31 January 2022 12:20
|
 |
|
Re: Display transparent paper
By: Oblivion on Mon, 31 January 2022 17:47
|
 |
|
Re: Display transparent paper
By: Silvan on Mon, 31 January 2022 18:46
|
Goto Forum:
Current Time: Tue Apr 29 16:19:43 CEST 2025
Total time taken to generate the page: 0.01130 seconds
|