Jump to content

Fabien Comte

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Fabien Comte

  1. Hello,

    I am close to finish the design of a product for a customer. Is that a problem if i buy Ugxf license myself ? Is that legally ok for my customer ?

  2. If you take a simple button, you can see that the text draw is after the retangle draw. I modified some controls to use pixmaps for compositions and display is very clean. I can move controls with no blink effect now

    Thank you all people for your help.

  3. Ok i found, there was a timer that sometimes was fighting against me. I moved to immediate configuration and i was able to do everything i wanted.

    Thank you all people for your help.

  4. Hello,

    It's more complex that i imaginated. I tried to move on GWIN_REDRAW_IMMEDIATE = GFX_ON but gwinHide(ghMyPageContainer1); is never goes out. Do i missed something ?

  5. Hello, 

    I want to hide a button before animate another one.

    That doesn't work (strange colors at old position):

    gwinSetVisible(ghPushbutton1, FALSE);
    GWidgetObject * temp_control = ((GWidgetObject *) ghPushbutton1);
    gdispGFillArea(temp_control->g.display, temp_control->g.x - border, temp_control->g.y - border, temp_control->g.width + 2 * border, temp_control->g.height + 2 * border, GFX_BLACK);

    That works (hidden but can be clicked):

    GWidgetObject * temp_control = ((GWidgetObject *) ghPushbutton1);
    gdispGFillArea(temp_control->g.display, temp_control->g.x - border, temp_control->g.y - border, temp_control->g.width + 2 * border, temp_control->g.height + 2 * border, GFX_BLACK);

    It looks like if set invisible launched a background task.

    Do I missed something ?

     

  6. Hello,

    I already asked a close question how to use a double buffer. Response was not possible. I have some blink issues when i move a simple buton due to buton background fill. Is there any way to prepare a full render in a pixmap and swap (unsynchronized with display) when done.

    If not, is there any way to draw completly a control on a pixmap and write it on display when all processing was done ?

    Thank you

    ps: my target is linux framebuffer.

  7. Hello,

    I tried to implement a statusbar based on your exemple on my project. It's a Linux with touchscreen and _mouseDown is never called (i am sure that touch works because button events are ok)

    static void _mouseDown(GWidgetObject* gw, coord_t x, coord_t y)
    {
    	printf("_mouseDown (%d,%d)\n", x, y); // never called
    	// ...

    in my main

    void * events_function(void *arg)
    {
    	printf("events_function start\n");
    	while(1) 
    	{
    		// Get an Event
    		GEvent * pe = geventEventWait(&gl, 1000);
    
    		// ...
    	}
    }
    
    
    int main()
    {
    	// ... 
    
    	geventListenerInit(&gl);
    	gwinAttachListener(&gl);
    
    	// ...
    
    
    	if (pthread_create(&events_thread, NULL, events_function, NULL) == -1) 
    	{
    		perror("pthread_create events_thread");
    		return EXIT_FAILURE;
        }
    
    	// ...

     

    Do you have an idea of what can i check ?

  8. Hello,

    When i draw my images, it looks like x and y are expected values + 2

    This is the code

    void gwinMyButtonCustomDraw(GWidgetObject *gw, void *param) 
    {
    	const GColorSet *	pcol;
    	coord_t				sy = 0;
    
    	if (gw->g.vmt != (gwinVMT *)&buttonVMT)	return;
    	
    
    	gdispImage * temp_images = (gdispImage *)param;
    	gdispImage * temp_image = NULL;
    		
    	if (!(gw->g.flags & GWIN_FLG_SYSENABLED)) 
    	{
    		temp_image = &(temp_images[BUTTON_DISABLED]);
    	} 
    	else if ((gw->g.flags & GBUTTON_FLG_PRESSED)) 
    	{
    		temp_image = &(temp_images[BUTTON_ACTIVE]);
    	} 
    	else 
    	{
    		temp_image = &(temp_images[BUTTON_IDLE]);
    	}
    	
    	gdispGImageDraw(gw->g.display, temp_image, gw->g.x, gw->g.y, gw->g.width, gw->g.height, 0, sy);
    	
    	if (gw->text[0] != '\0')
    	{
    		pcol = getButtonColors(gw);
    		gdispGDrawStringBox(gw->g.display, gw->g.x+1, gw->g.y+1, gw->g.width-2, gw->g.height-2, gw->text, gw->g.font, pcol->text, justifyCenter);
    	}
    }

     

    And a schematic (i noticed that because my button image was a prolongation of the background)

    draw_problem.png

×
×
  • Create New...