BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Pages: 1 [2]

Author Topic: Question for method BLENDING  (Read 26180 times)

Prog_11

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Question for method BLENDING
« Reply #15 on: January 06, 2020, 02:58:17 PM »

Hi,

@ BRT Community: What does your development team say?

@ all: Does anybody know a solution?
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: Question for method BLENDING
« Reply #16 on: January 08, 2020, 03:22:03 AM »

I found in ESD 4.8 there is the widget "ESD Circle Line" and "ESD Gradient" can fit most of your requirement, except the semitransparent.  Please have a check the image I enclosed.
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: Question for method BLENDING
« Reply #17 on: January 09, 2020, 09:40:46 AM »

Please check the code below in the ESE and it shall get the effect as the enclosed image.

Try to change the "ALPHA_TEST" and replace the value with 125 to see the semi-transparent effect of contour.

Quote
CLEAR_COLOR_RGB(255,255,255)
CLEAR_COLOR_A(255)
CLEAR(1, 1, 1)

CMD_GRADIENT(100, 207, 0x007FFF, 244, 189, 0x7FFF00)

SAVE_CONTEXT()
SCISSOR_XY(100, 100)
SCISSOR_SIZE(100, 100)

COLOR_RGB(255,255,255)
COLOR_A(255)

COLOR_MASK(0,0,0,1)
BLEND_FUNC(ZERO, ZERO) #clear Alpha

BEGIN(RECTS)
VERTEX2II(100,100,0,0)
VERTEX2II(200,200,0,0)

COLOR_A(255) # ALPHA_TEST
BLEND_FUNC(SRC_ALPHA, ZERO) #Set Alpha
POINT_SIZE(800)
BEGIN(POINTS)
VERTEX2II(150,150, 0,0)

BLEND_FUNC(ZERO, ZERO) #clear Alpha
POINT_SIZE(400)
BEGIN(POINTS)
VERTEX2II(150,150, 0,0)

COLOR_RGB(245,58,41)
COLOR_A(255) #ALPHA_TEST
COLOR_MASK(1,1,1,1)
BLEND_FUNC(DST_ALPHA, ONE_MINUS_DST_ALPHA)


BEGIN(RECTS)
VERTEX2II(100,100,0,0)
VERTEX2II(200,200,0,0)

RESTORE_CONTEXT()


Logged

Prog_11

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Question for method BLENDING
« Reply #18 on: January 13, 2020, 10:24:06 AM »

Hi pauljiao,

Thanks for your answer, but please have a heart and read my specification. There are still alias effects and the ring should be 100% transparent and the surrounding area should not be.

The very simple problem seems to be more and more an unsolvable problem...

@ BRT Community: What does your development team say?
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Question for method BLENDING
« Reply #19 on: January 14, 2020, 10:51:47 AM »

Hello

Over development team concurs with pauljiaos approach.

Maybe you could provide a render of what exactly you are trying to achieve, I found your original description rather vague/hard to visualise. But it is important to remember EVE is intended for use with low power MCUs to facilitate HMIs, it is not an high power graphics IC and some aliasing effects may be present. As you can see from the range of demos available from the software examples section of our website, EVE is a very capable graphics IC in its own right, but there may be some hardware limitations on what you're trying to achieve.

Best Regards,
BRT Community
Logged

mmottola

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Question for method BLENDING
« Reply #20 on: February 28, 2023, 06:22:29 PM »

Hi pauljiao,

Thanks for your answer, but please have a heart and read my specification. There are still alias effects and the ring should be 100% transparent and the surrounding area should not be.

The very simple problem seems to be more and more an unsolvable problem...

@ BRT Community: What does your development team say?

Apologies for bumping an old thread, but I believe the issue was with the aliasing on the inner portion of the ring. By adding an additional point with blending to @pauljiao provided snippet, anti-aliasing of the inner portion can be achieved while still allowing for transparency.

Code: [Select]
CLEAR_COLOR_RGB(255,255,255)
CLEAR_COLOR_A(255)
CLEAR(1, 1, 1)

CMD_GRADIENT(100, 207, 0x007FFF, 244, 189, 0x7FFF00)

SAVE_CONTEXT()

SCISSOR_XY(100, 100)
SCISSOR_SIZE(101, 101)

COLOR_RGB(255,255,255)
COLOR_A(255)

COLOR_MASK(0,0,0,1)
BLEND_FUNC(ZERO, ZERO)

BEGIN(RECTS)
VERTEX2F(1600, 1600)
VERTEX2F(3200, 3200)

COLOR_A(255) // Circle transparency
BLEND_FUNC(SRC_ALPHA, ZERO)
POINT_SIZE(800)
BEGIN(POINTS)
VERTEX2F(2400, 2400)

BLEND_FUNC(ZERO, ZERO)
POINT_SIZE(384)
BEGIN(POINTS)
VERTEX2F(2400, 2400)

//Anti-aliasing inner portion
BLEND_FUNC(ZERO, ONE_MINUS_SRC_ALPHA)
POINT_SIZE(416)
BEGIN(POINTS)
VERTEX2F(2400, 2400)

COLOR_RGB(245,58,41)
COLOR_A(255)
COLOR_MASK(1,1,1,1)
BLEND_FUNC(DST_ALPHA, ONE_MINUS_DST_ALPHA)

BEGIN(RECTS)
VERTEX2F(1600, 1600)
VERTEX2F(3200, 3200)

RESTORE_CONTEXT()
« Last Edit: March 01, 2023, 04:57:32 PM by mmottola »
Logged

pauljiao

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: Question for method BLENDING
« Reply #21 on: March 27, 2023, 03:34:17 AM »

Thanks mmottola. Your tip works well.
Logged
Pages: 1 [2]