Start a new topic

Get color of a pixel on the screen

Hi, I'm trying to code an anti-aliasing function with an external MCU and then color every single pixel with Nextion's built-in instructions, but therefore I need to know the exact color of every single pixel on the screen.


Something like 

getpix x,y


Is there any instruction that could do this?



no

that's really not a HMI requirement ...

just use your graphic programm to generate your antialiased static text ... I guess such software can do the job much better ...

 

Parts of my project uses antialiased static text (created with Photoshop), but others use texts and others controls' data generated dinamically. 

I've already read the topic where you or Patrick says that pretty text isn't a requirement with MCU's projects but if it can done.. why not?


I'm planning to use Nextion displays for a commercial product (buying in bulk orders) and having antialiased text could be a great step up for our potential customers.

I don't think I have ever said pretty text isn't a requirement.

  - logically? why would waste many hours to create a ZI Font Editor

    if there was such a remote possibility that ugly could suffice?


But, I have said many times the nature of the embedded world

   is to use a mono-bit font format - therefore fixing erroneous

   pixels provides a appealing font for general usage.


Many projects use much smaller MCUs than what you refer to.

Such routines I indeed have to imagine exceed 2KB

This indeed would consume total resources of many MCUs


To do as you might suggest over a low speed serial of 115200

  ... have you thought about, or is this academically speaking?


Academically speaking, the MCU you would have selected to do this smoothing already has mass resources, both in terms of ram and in terms of space.  Therefore it is more than capable of shadowing the known resources you loaded into your HMI.  As such it would be possible to shadow what is drawn on the Nextion within the ram of your selected MCU.  As such, the pixels that need be changed, you would already have the colors

for such and then adjust over serial with Nextion GUI commands.


But as for this type of graphics library to reside in firmware as a feature, on has to ask what features they are hell bent on letting go of.  For this there is no such consciences within the community.   Some may have no need of sliders, buttons, pictures and return data, while others need a few of those but would be willing to let waveforms go to the wayside.  Certainly not all will/could fit within the space available for firmware.


But regardless of any quantities that may or may not be purchased in the future - there current is no command to get pixel. 


Certainly as Gerry suggests to use a graphics program to provide the anti-aliased font smoothed text that matches your other chosen resources is easier than smoothing over serial and such is a method currently available to users without such a hard effort.


Login or Signup to post a comment