|
From: | Serge Bromow |
Subject: | Re: [XForms] How to do animated pixmap objects |
Date: | Mon, 19 May 2014 07:22:51 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Bonjour Francis, I can't help with the buttons. Jens approach looks like the best solution. With the VU meter this may help. I found an old app that allows a view of a section of a large map in a smaller canvas window. The routines are as follows; FL_IMAGE *image, *tage; // The large map is a jpeg. flimage_enable_jpeg(); // Load the entire map into the canvas cv0 if( (image = flimage_load( file )) ){ flimage_display(image, FL_ObjWin(fd_xs->cv0) ); } // Duplicate the image in tage so we do not disturb the original image tage = flimage_dup(image); flimage_scale(tage, 800.0, 600.0, 0); // display the scaled image on the canvas flimage_display(tage, FL_ObjWin(fd_xs->cv0) ); flimage_free(tage); // to crop and display a section of the image, in your case the VU settings. // flimage_crop(image[0], int xleft, int ytop, int xright, int ybottom); tage = flimage_dup(image); flimage_crop(tage, (int) bottom, (int) side, 0, 0); flimage_display(tage, FL_ObjWin(fd_xs->cv0) ); flimage_free(tage); Using the "flimage_crop" you can display sections of your image to simulate meter movements. It seems quite responsive clipping an 2166x1368 base image into a 800x600 canvas. I would imagine it would be much faster with a smaller source image into an even smaller display canvas. Just a thought, Serge On 05/18/2014 06:23 AM, Francis DUPUIS
wrote:
--
Serge Bromow DineAmix Inc. <address@hidden> (613) 260-8629 888 411-6636 Ottawa, Canada. Please Consider the Environment before Printing the E-Mail. IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed. The message may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify DineAmix Inc. immediately by email at address@hidden. Thank you. |
[Prev in Thread] | Current Thread | [Next in Thread] |