PIXELATEDLGPARAMS

typedef struct _PIXELATEDLGPARAMS 
{ 
   L_UINT uStructSize; 
   pBITMAPHANDLE pBitmap; 
   L_BOOL bZoomToFit; 
   L_UINT uCellWidth; 
   L_UINT uCellHeight; 
   L_UINT uOpacity; 
   POINT ptCenter; 
   L_UINT uPixelateFlags; 
   L_UINT32 uDlgFlags; 
   LTCOMMDLGHELPCB pfnHelpCallback; 
   L_VOID *pHelpCallBackUserData; 
} PIXELATEDLGPARAMS,* LPPIXELATEDLGPARAMS; 

The PIXELATEDLGPARAMS structure provides information used to initialize the dialog box created by the L_DlgPixelate function. After the user closes the dialog box, this structure is updated with information about the user's selections.

Members

uStructSize

Size of this structure, in bytes. Use the sizeof operator to calculate this value.

pBitmap

Pointer to the bitmap handle that references the bitmap used for preview or processing.

bZoomToFit

Flag that indicates the zoom level for previewing the image. Possible values are:

Value Meaning
TRUE Set the initial zoom level to "Zoom to fit".
FALSE Set the initial zoom level to "Normal (1:1)".

uCellWidth

Value that represents the width of a rectangular cell, the number of rectangular cells present across the width of the bitmap, the number of cells around the center point of a circular cell, or the length in degrees of each cell around the center point of a circular cell, based on the flags set in uPixelateFlags. For more information on the different types of information contained in this member, refer to L_PixelateBitmap.

uCellHeight

Value that represents the height of a rectangular cell, the number of rectangular cells present across the height of the bitmap, the number of cells along the radius of a circular cell, or the length of each cell along the radius of a circular cell, based on the flags set in uPixelateFlags. For more information on the different types of information contained in this member, refer to L_PixelateBitmap.

uOpacity

Value that represents how transparent the cells are, compared to the original pixels. This is a percentage. Possible values are 0 - 100. (0 is total opacity and 100 is total transparency.)

ptCenter

Point that represents the center of revolution when circular cells are used. This parameter will be ignored if PIX_RECT is set in uPixelateFlags. This center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

uPixelateFlags

Flags that indicate the values used to fill the cells, the shape of the cells, and what type of data is in the uCellWidth and uCellHeight parameters. You can use a bitwise OR (|) to specify one flag from each group. Possible values are:

Value Meaning
Fill the cells
PIX_MAX [0x0000] Fill the cell with the maximum pixel value of the cell.
PIX_MIN [0x0001] Fill the cell with the minimum pixel value of the cell.
PIX_AVR [0x0002] Fill the cell with the average pixel value of the cell.
Shape of the cells
PIX_RECT [0x0000] Divide the image into rectangular cells. If this flag used, the uCellWidth value contains the cell width in pixels or the number of cells across the width of the bitmap. uCellHeight contains the cell height in pixels or the number of cells across the height of the bitmap.
PIX_RAD [0x0010] Divide the image into circular cells, centered on CenterPt. If this flag is used, the uCellWidth value determines the angular component of the cell, and uCellHeight determines the radial component of the cell. Please note that PIX_RAD must be OR-ed with PIX_WPER or PIX_WFRQ.
Information is contained in the uCellWidth and uCellHeight parameters
PIX_WFRQ [0x0100] Indicates the number of cells along the width of the bitmap if rectangular cells are used. If circular cells are used, this indicates the number of cells present around the center of the circle.
PIX_WPER [0x0200] Indicates the width, in pixels of a cell, if rectangular cells are used. If circular cells are used, this indicates the number of degrees in each cell around the center point.
PIX_HFRQ [0x0400] Indicates the number of cells along the height of the bitmap if rectangular cells are used. If circular cells are used, this indicates the number of cells present along the radius of the circle.
PIX_HPER [0x0800] Indicates the height, in pixels of a cell, if rectangular cells are used. If circular cells are used, this indicates the radial length of each cell along the radius.

uDlgFlags

User interface flags for this dialog, which determine the layout and action of the dialog. Possible values are:

Value Meaning
DLG_PIXELATE_AUTOPROCESS [0x00000001] process the image on OK. The pBitmap member of this structure should contain a valid bitmap.
DLG_PIXELATE_SHOW_CONTEXTHELP [0x00000002] dialog should contain a context sensitive help icon.
DLG_PIXELATE_SHOW_PREVIEW [0x00000004] show a preview of the image in the dialog. The pBitmap member of this structure should contain a valid bitmap.
DLG_PIXELATE_SHOW_TOOL_ZOOMLEVEL [0x00000008] show the "Zoom to fit" and "Zoom Normal" toolbar buttons. The DLG_PIXELATE_SHOW_PREVIEW flag must be set in order to show these buttons.
DLG_PIXELATE_SHOW_APPLY [0x00000080] Show the Apply button in the dialog. The dialog will not apply any effect unless the user presses the Apply button.

pfnHelpCallback

Pointer to an optional help callback function. If you do not wish to provide help to this dialog, use NULL as the value of this parameter. To provide help to this dialog, use the function pointer as the value of this parameter. The callback function must adhere to the prototype described in LTCOMMDLGHELPCB.

pHelpCallBackUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pHelpCallBackUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Common Dialog C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.