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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - pauljiao

Pages: 1 [2] 3 4
16
Discussion - EVE / Re: Auto-increment on spinner
« on: November 02, 2020, 09:21:20 AM »
what is spinner button? do you mean "ESD SpinBox" Widget?


17
Discussion - EVE / Re: ESD 4.8 - STM32 - Image
« on: July 22, 2020, 10:30:04 AM »
I rememeber the default location of assets is on the SD card unless it is specially designated to flash.

18
Discussion - EVE / Re: Image corruption
« on: June 24, 2020, 03:39:07 AM »
T.Pierret, Glad to know your issue is fixed.

The coprocessor command cmd_setbitmap is just to generate a series of display list for graphics engine:
Code: [Select]
bitmap_source()
bitmap_layout()
bitmap_layout_h
bitmap_size
bitmap_size_h
bitmap_ext_format (if required)



Quote
In the current case, the splash image is 800x480 and the icons, 80x80. Why are they requested however?

The bitmap_size_h/bitmap_layout_h set by splash image(larger image) changed the graphics context and it kept effective until it is changed by the following display list. I think it may cause the issue of displaying smaller icon.

19
Discussion - EVE / Re: Capacitive touch screen calibration
« on: June 24, 2020, 02:45:12 AM »
For calibration process of capacitive touch screen, it shall be done in compatability mode (single touch) only.

It is not possible to do the calibration at the extended mode.

So to read the final touch point coordinate (after the calibration process),  REG_CTOUCH_TOUCH_XY at address 0x302124  shall be read.  The coordinate before the calibration process is stored to REG_CTOUCH_RAW_XY at 0x30211c.   

These are what I understand from programming guide.

20
Discussion - EVE / Re: Image corruption
« on: June 23, 2020, 09:32:28 AM »
Several comments:
1)  is the JPEG image displayed correctly before the icon is shown?
2)  Suggest to use cmd_setbitmap at 4th step (Display Icon) because it will take care of bitmap_layout_h/bitmap_size_h, which was generated in JPEG image loading.  If not, better send
bitmap_layout_h and bitmap_size_h with bitmap_layout and bitmap_size commands.  Otherwsise,
it may have issues if these commands have affected the graphics context.

21
Discussion - EVE / Re: UTF-8 Encoding Error
« on: May 08, 2020, 04:48:19 AM »
Simon, as far as I knew, rendering the glyph from flash needs
1) The glyph is based on ASTC.
2) The starting address in flash shall be 64 bytes aligned.  From the screenshot, you may see the address 10000 is not 64 bytes aligned.


22
Discussion - EVE / Re: BT816 : flash reading fail
« on: May 08, 2020, 04:24:27 AM »
As far as I knew,  BT815/6 cannot work with a blank flash chip.  It requires a flash driver called blob locating at the first block of the flash chip.  After erasing of the flash, the first block of the flash chip might be erased too.  So you may need reprogram the blob to the flash before reading/writing.  The Blob file can be obtained from EAB.

23
Discussion - EVE / Re: issue with EVE Asset Builder 1.2.0
« on: February 11, 2020, 02:14:55 AM »
It seems the "dithering" feature in EAB does not work well on all the cases.
I suggest to disable the "dithering" by calling command line with option "-d" such as:

".\eab_tools.exe  image_convert -i inputFile.png -f ARGB1555 -d "

".\eab_tools.exe" is located at installation path of EAB.

24
Discussion - EVE / Re: Alpha Value ignored for ESD_Circle_Line
« on: January 09, 2020, 10:46:58 AM »
You can try to update the file "Ft_Esd_CircleLine.c" under "Libraries\Ft_Esd_Widgets" folder of ESD installation path with the following content:
It will enable the alpha property of ESD circle line widget after you reboot the ESD.

Quote
#include "Ft_Esd.h"
#include "Ft_Esd_Dl.h"
#include "Ft_Esd_CircleLine.h"

extern Ft_Gpu_Hal_Context_t *Ft_Esd_Host;

void Ft_Esd_CircleLine_SetDSTAlpha();
void Ft_Esd_CircleLine_ClearDSTAlpha();
void Ft_Esd_CircleLine_Draw_Point(int x, int y, int radius);
void Ft_Esd_CircleLine_Draw_Point_Float(ft_float_t x, ft_float_t y, ft_float_t radius);
void Ft_Esd_CircleLine_Draw_Square(int x, int y, int side);

ESD_METHOD(Ft_Esd_CircleLine_Render_Func, Context = Ft_Esd_CircleLine)
ESD_PARAMETER(x, Type = int)
ESD_PARAMETER(y, Type = int)
ESD_PARAMETER(radius, Type = int)
ESD_PARAMETER(border, Type = int)
ESD_PARAMETER(color, Type = ft_argb32_t)
void Ft_Esd_CircleLine_Render_Func(Ft_Esd_CircleLine *context, int x, int y, int radius, int border, ft_argb32_t color);

void Ft_Esd_CircleLine_Render_Func(Ft_Esd_CircleLine *context, int x, int y, int radius, int border, ft_argb32_t color)
{
   if (radius < 0)
      return;
   int a = ((color & 0xFF000000)) >> 24;
   int r = ((color & 0x00FF0000)) >> 16;
   int g = ((color & 0x0000FF00)) >> 8;
   int b = ((color & 0x000000FF));
   int innerRadius = radius - border;
   if (innerRadius < 0)
      innerRadius = 0;

   Ft_Esd_Primitive = 0;
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, SAVE_CONTEXT());

   Ft_Esd_Rect16 scissor = Ft_Esd_Rect16_Crop(context->Widget.GlobalRect, Ft_Esd_Dl_Scissor_Get());
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, SCISSOR_XY(scissor.X, scissor.Y));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, SCISSOR_SIZE(scissor.Width, scissor.Height));
   
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, COLOR_MASK(0, 0, 0, 1));

    //Draw the rectangle covering whole circle with alpha value 0
   Ft_Esd_CircleLine_ClearDSTAlpha();   
   Ft_Esd_CircleLine_Draw_Square(x - radius - 1, y - radius - 1, (radius * 2) + 2);
   
   //Draw outer circle with desired alpha value
    Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, COLOR_A(a));
   Ft_Esd_CircleLine_SetDSTAlpha();
   Ft_Esd_CircleLine_Draw_Point(x, y, radius);
   
   //Draw inner circle with alpha value 0
   Ft_Esd_CircleLine_ClearDSTAlpha();   
   if (innerRadius > 0)
   {
      Ft_Esd_CircleLine_Draw_Point(x, y, innerRadius);
   }

   // Finally draw final color 
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, COLOR_RGB(r, g, b));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, COLOR_A(a));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, COLOR_MASK(1, 1, 1, 1));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, BLEND_FUNC(DST_ALPHA, ONE_MINUS_DST_ALPHA));
   Ft_Esd_CircleLine_Draw_Square(x - radius, y - radius, radius * 2);

   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, RESTORE_CONTEXT());
}

void Ft_Esd_CircleLine_SetDSTAlpha()
{
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, BLEND_FUNC(SRC_ALPHA, ZERO));
}

void Ft_Esd_CircleLine_ClearDSTAlpha()
{
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, BLEND_FUNC(ZERO, ZERO));
}

void Ft_Esd_CircleLine_Draw_Square(int x, int y, int side)
{
#if (EVE_MODEL >= EVE_FT810)
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, VERTEX_FORMAT(4));
#endif
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, BEGIN(RECTS));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, LINE_WIDTH(16));
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, VERTEX2F((x * 16), (y * 16)));
   x += side;
   y += side;
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, VERTEX2F((x * 16), (y * 16)));
   // Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, END());
}

void Ft_Esd_CircleLine_Draw_Point(int x, int y, int radius)
{
   Ft_Esd_CircleLine_Draw_Point_Float((ft_float_t)x, (ft_float_t)y, (ft_float_t)radius);
}

// FIXME: Use ft_int16_f4_t as fixed point instead of float
void Ft_Esd_CircleLine_Draw_Point_Float(ft_float_t x, ft_float_t y, ft_float_t radius)
{
#if (EVE_MODEL >= EVE_FT810)
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, VERTEX_FORMAT(4));
#endif
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, BEGIN(FTPOINTS));
   int iR = (radius * 16.0f) + 0.5f;
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, POINT_SIZE(iR));
   int iX = (x * 16.0f) + 0.5f;
   int iY = (y * 16.0f) + 0.5f;
   Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, VERTEX2F(iX, iY));
   // Ft_Gpu_CoCmd_SendCmd(Ft_Esd_Host, END());
}


25
Discussion - EVE / Re: Question for method BLENDING
« 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()



26
Discussion - EVE / Re: Question for method BLENDING
« 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.

27
Discussion - EVE / Re: Question for method BLENDING
« on: December 16, 2019, 02:08:01 AM »
Is the alias effect visible on your real hardware(LCD)?

28
Discussion - EVE / Re: Question for method BLENDING
« on: December 16, 2019, 02:00:24 AM »
Hello,

here is my display list. But in the heat of battle it seems I have not stored the version I have sent in the picture. As you can see, in the version below there is a gray dot in the middle.

CLEAR(1, 1, 1)
CMD_GRADIENT(17, 64, 0x0075AF, 230, 226, 0xA6F1FF)

COLOR_MASK(0, 0, 0, 1)
BLEND_FUNC(ONE, ONE_MINUS_SRC_ALPHA)
COLOR_A(255)
BEGIN(POINTS)            
POINT_SIZE(1000)
VERTEX2II(133, 176, 0, 0)

COLOR_MASK(1, 1, 1, 0)   
BLEND_FUNC(ONE_MINUS_DST_ALPHA, SRC_ALPHA)
BEGIN(RECTS)            
VERTEX2II(0, 0, 0, 0)         
VERTEX2II(239, 319, 0, 0)

COLOR_MASK(0, 0, 0, 1)
COLOR_A(128)
BLEND_FUNC(ZERO, ONE_MINUS_SRC_ALPHA)
BEGIN(POINTS)            
POINT_SIZE(500)
VERTEX2II(133, 177, 0, 0)


COLOR_MASK(1, 1, 1, 0)         
BLEND_FUNC(ONE_MINUS_DST_ALPHA, DST_ALPHA)
BEGIN(RECTS)            
VERTEX2II(0, 0, 0, 0)         
VERTEX2II(239, 319, 0, 0)

I tried the display list in ESE and found the effect is acceptable, although the alias effect can be seen if you zoomed in the picture.

29
Discussion - EVE / Re: Best way to manage many dynamic objects
« on: December 03, 2019, 09:33:49 AM »
For widget creating in dynamic way,  you may find the reference code in "Examples\Intermediate\ScrollPanel" under installation folder.  Open the project and see
the code in MainPage.c.

30
Discussion - EVE / Re: fading screen flicker
« on: November 13, 2019, 08:57:19 AM »
Tested your first failure case on my setup (Riverdi 5 inch 800x480) by using the flash file Rudolph sent.
Quote
0 1 2 3 4 5 6
7 0 0 0 0 0 0

The result is as picture and no failure at all.

Here is my EVE code:
Quote
CLEAR(1, 1, 1)

CMD_SETBITMAP(0x800000 | 128, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
BEGIN(BITMAPS)
VERTEX2II(0,0,0,0)

CMD_SETBITMAP(0x800000 | 214, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX2II(104,0,0,0)

CMD_SETBITMAP(0x800000 | 300, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX2II(208,0,0,0)


CMD_SETBITMAP(0x800000 | 386, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX2II(312,0,0,0)


CMD_SETBITMAP(0x800000 | 472, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX2II(416,0,0,0)

CMD_SETBITMAP(0x800000 | 558, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX_FORMAT(0)
VERTEX2F(520,0)


CMD_SETBITMAP(0x800000 | 644, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX_FORMAT(0)
VERTEX2F(624,0)

CMD_SETBITMAP(0x800000 | 730, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX_FORMAT(0)
VERTEX2F(0,104)

CMD_SETBITMAP(0x800000 | 128, COMPRESSED_RGBA_ASTC_8x8_KHR, 104, 104)
VERTEX2F(104,104)
VERTEX2F(208,104)
VERTEX2F(312,104)
VERTEX2F(416,104)
VERTEX2F(520,104)
VERTEX2F(624,104)


Pages: 1 [2] 3 4