Image area
QPix provides a scrollable plug-in area for displaying disk-based images and 4D picture objects. The area includes a menu bar, a tools widget and a zoom widget.
To add a QPix area to a form, create a plug-in area object and select _QPix from the popup menu in the properties window. After the area rectangle is created, choose Advanced... from the properties palette to invoke to the area's Advanced Properties Dialog and do the initial setup of the area without writing any code. Later, in your code, you can introduce changes programmatically, using the commands described in this chapter.
Note
Offscreen buffers: QPix speeds up screen redraws by using offscreen buffers when displaying disk files. The memory occupied by offscreen buffers depends solely on pixel depth and image dimensions (the size of the image file is irrelevant), and they may require a lot of memory.
Pictures: When displaying a 4D picture, QPix allocates and maintains a copy of the picture data. If you are displaying large pictures, set the original 4D picture to null in order to preserve memory (pict := pict * 0). Another good idea is to pass local pict variables to QPix; local variables exist only within the scope of the calling method and they are automatically destroyed by 4D.
Commands
QPx_SetAreaStyle | Configure the appearance of a QPix plug-in area |
QPx_GetAreaStyle | Get the appearance configuration of a QPix plug-in area |
QPx_SetAreaParts | Configure the visibility of the parts of a scrollable QPix plug-in area |
QPx_GetAreaParts | Get the visibility configuration of the parts of a scrollable QPix plug-in area |
QPx_SetAreaTools | Configure the tools of a scrollable QPix plug-in area |
QPx_GetAreaTools | Get the configuration of the tools of a scrollable QPix plug-in area |
QPx_SetAreaFlags | Configure various options of a QPix plug-in area |
QPx_GetAreaFlags | Get various configuration options of a QPix plug-in area |
QPx_SetAreaBackgroundColor | Set the background color of a QPix area |
QPx_GetAreaBackgroundColor | Get the background color of a QPix area |
QPx_SetAreaScrollOffset | Change the scroll offsets of a scrollable QPix plug-in area |
QPx_GetAreaScrollOffset | Get the scroll offsets of a scrollable QPix plug-in area |
QPx_SetAreaCurrentTool | Set the currently selected tool in a scrollable QPix plug-in area |
QPx_GetAreaCurrentTool | Get the currently selected tool in a scrollable QPix plug-in area |
QPx_SetAreaZoomFactor | Set the zoom factor of a scrollable QPix plug-in area |
QPx_GetAreaZoomFactor | Get the zoom factor of a scrollable QPix plug-in area |
QPx_SetAreaSelection | Set the selection marquee in a scrollable QPix plug-in area |
QPx_GetAreaSelection | Get the selection maquee of a scrollable QPix plug-in area |
QPx_GetAreaCmdStatus | Get the status of a QPix plug-in area command |
QPx_DoAreaCommand | Execute a QPix plug-in area command |
QPx_CountAreaPages | Get the number of pages of the image being displayed in a QPix area |
QPx_GetAreaPage | Get the number of the page being displayed in a QPix area |
QPx_SetAreaPage | Switch to a specific page of the image being displayed in a QPix area |
QPx_SetAreaImageFile | Display an image file in a QPix area |
QPx_GetAreaImageFile | Get the image file being displayed in a QPix area |
QPx_SetAreaPicture | Display a 4D picture in a QPix area |
QPx_GetAreaPicture | Get the 4D picture being displayed in a QPix area |
QPx_SetAreaImporter | Assign a graphics importer instance to a QPix area |
QPx_GetAreaImporter | Get a reference to the graphic importer used by a QPix area |
QPx_CropAreaImage | Crop the image in a QPix area to the current selection marquee |
QPx_RotateAreaImage | Rotate the image in a QPix area by a number of degrees |
QPx_ResizeAreaImage | Resize the image in a QPix area |
QPx_FlipAreaImage | Flip the image in a QPix area horizontally and/or vertically |
QPx_InvertAreaImage | Invert the colors of the image in a QPix area |
QPx_ExportAreaImage | Export the image of a QPix area to an image file |
QPx_FilterAreaImage | Apply a filter to the image in a QPix area |
QPx_BrightnessContrastAreaImg | Apply the Escape Brightness and Contrast filter to the image in a QPix area |
QPx_SharpenAreaImage | Apply the Sharpen filter to the image in a QPix area |
QPx_BlurAreaImage | Apply the Blur filter to the image in a QPix area |
QPx_RGBBalanceAreaImage | Apply the RGB Balance filter to the image in a QPix area |
QPx_HSLBalanceAreaImage | Apply the HSL-Balance filter to the image in a QPix area |