cancel
Showing results for 
Search instead for 
Did you mean: 

Feature request: Ability to hide blue border in editor

Currently the blue border masks the pixels on the edge so you cannot see what you are doing.
Example:

unsigned_char_array_0-1743081297640.png

I want to be able to select and edit the widget while also seeing it completely.
I also want to be able to zoom in more than 500% and the ability to see a pixel grid. It's easy to be off by one.

 

Edit: Additionally I'd like to be able to set scaling of the simulator application. I have a high resolution PC monitor and have set windows scaling to 150%. Screenshots in TouchGFX simulator with F3 are pixel perfect, but rendering is done using windows scaling, so it is not as sharp. If someone can help me set scaling of simulator.exe that would be great. I can override the settings and set it to 100%, but I cannot set it to 200%. In visual studio I can override the setting this way: https://learn.microsoft.com/en-us/answers/questions/154656/vs2017-debugging-with-high-dpi-scaling-override But this only sets it to 100%, not 200%. I want square pixels. So 1 pixel should be 4, 9 or 16 pixels of the same color.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
3 REPLIES 3
GaetanGodart
ST Employee

Hello @unsigned_char_array ,

 

Thank you for your feedback, I will inform the team about your request.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

I have fixed the scaling issue at least. I think this should be easy to add to TouchGFX. Of course I haven't tested it thoroughly and haven't used portrait orientation, etc. But I think this is probably correct.

I've modified my HALSDL2.cpp file like so:

static uint16_t HALSDL2__FRAME_BUFFER_WIDTH = 0;
static uint16_t HALSDL2__FRAME_BUFFER_HEIGHT = 0;
+
+static uint16_t SDL_SCALE = 2;
+
static uint16_t* single_buf = NULL;
static uint16_t* double_buf = NULL;
static uint16_t* anim_store = NULL;

#if defined(WIN32) || defined(_WIN32)
@@ -110,12 +113,14 @@ void HALSDL2::renderLCD_FrameBufferToMemory(const Rect& _rectToUpdate, uint8_t*
srcRect.y = rectToUpdate.y;
srcRect.h = rectToUpdate.height;
srcRect.w = rectToUpdate.width;

SDL_Rect dstRect = srcRect;
- dstRect.x = rectToUpdate.x + getCurrentSkinX();
- dstRect.y = rectToUpdate.y + getCurrentSkinY();
+ dstRect.x = rectToUpdate.x + getCurrentSkinX()* SDL_SCALE;
+ dstRect.y = rectToUpdate.y + getCurrentSkinY()* SDL_SCALE;
+ dstRect.h = srcRect.h * SDL_SCALE;
+ dstRect.w = srcRect.w * SDL_SCALE;

SDL_RenderCopy(simulatorRenderer, framebufferTexture, &srcRect, &dstRect);

if (isSkinActive && currentSkin != 0 && !(currentSkin->isOpaque || currentSkin->hasSemiTransparency))
{
@@ -528,12 +533,12 @@ void HALSDL2::alphaChannelCheck(SDL_Surface* surface, bool& isOpaque, bool& hasS
return;
}

bool HALSDL2::doSampleTouch(int32_t& x, int32_t& y) const
{
- x = _x - getCurrentSkinX();
- y = _y - getCurrentSkinY();
+ x = _x/ SDL_SCALE - getCurrentSkinX();
+ y = _y/ SDL_SCALE - getCurrentSkinY();

if (DISPLAY_ROTATION == rotate90)
{
int32_t tmp = x;
x = y;
@@ -796,10 +801,14 @@ void HALSDL2::recreateWindow(bool updateContent /*= true*/)
if (isSkinActive && currentSkin != 0)
{
width = currentSkin->surface->w;
height = currentSkin->surface->h;
}
+
+ width *= SDL_SCALE;
+ height *= SDL_SCALE;
+
if (isSkinActive && currentSkin != 0)

 And I've disabled the windows scaling like so:

unsigned_char_array_0-1743092258117.png

Now I get crisp integer scaling for my simulator application regardless of windows scaling settings!

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.

very interesting, thanks