• ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Windows update impacting certain printer icons and names. Microsoft is working on a solution.
    Click here to learn more
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
HP Prime v1
Microsoft Windows 10 (64-bit)

The RECT_P function doesn't seem to work as expected when alpha is used. On the Calculator The Alpha is ignored and on the emulator, the high alpha value seems to be passed to the border as well as nothing is shown. Is this intended?

4 REPLIES 4
HP Recommended

What are the inputs you are trying?

 

 

Are you up to date in the calc?

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
HP Recommended

Most of the RECT_Ps are written like this:

 

 

REPT_P(pxlCrd[1],pxlCrd[2],pxlCrd[1]+SQR-1,pxlCrd[2]+SQR-1,clr,#FF000000h);

where pxlCrd is =={x loc, y loc},

SQR is the side length of the square,

clr is the clr of the square,

and unless this changed with the update #FF000000h is full transparency.

 

This worked on ver 6030

I'm currently on ver 10637

HP Recommended

Thanks.

 

So you are trying to draw a square, but have a fully transparent inner with nothing drawn? Is that the intent here? If so, you should just skip the last "fill" color and that is the result. That is the normal way of doing it which is why nobody seems to have ever noticed this.

 

Note that it is possible you've uncovered an unintended behavior here when you DO define a fully transparent fill. I'm checking on that and if it is a bug we'll get it on the list to fix.

 

 

Also, note that I'd highly recommend using the RGB( ) macro instead of just #AABBGGRR directly. It really will be more readable and when we change color support to 32bits in the future you are ready to go with no worries. Right now it is just using 15 bit color on your hardware calculator (but the screen supports 32).

 

 [EDIT] I think you may be right that the fill alpha is taking priorty over the outline one. The logic came from the time when you old had a "transparent" flag, not true alpha blending like you have now in later Prime versions.

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
HP Recommended

Are you sure that RECT_P draws an outlined square when you exclude fill color. Help says fill color default is edge color. When I tested this, It behaved as help said.

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.