ADDBORDERINFO - Raster Imaging C API Help

ADDBORDERINFO

typedef struct _ADDBORDERINFO 
{ 
   L_UINT uStructSize; 
   L_INT nLeftThickness; 
   L_INT nTopThickness; 
   L_INT nRightThickness; 
   L_INT nBottomThickness; 
   L_INT nLocation; 
   L_INT nStyle; 
   L_INT nEffectStyle; 
   pBITMAPHANDLE pTileBitmap; 
   L_INT nGradientStyle; 
   COLORREF crGradientStart; 
   COLORREF crGradientEnd; 
   L_INT nCurveIntensity; 
   L_BOOL bSoftCurve; 
   L_BOOL bShadow; 
   L_INT nShadowSize; 
   L_INT nShadowDirection; 
   L_BOOL bBumpyShadow; 
} ADDBORDERINFO, *pADDBORDERINFO; 

The ADDBORDERINFO structure contains information about the border to add to the bitmap.

 

bSoftCurve Boolean flag that indicates whether to give the border a soft curve appearance. This flag is used only when nEffectStyle is BORDER_EFFECT_RAISED. Possible values are:
  Value Meaning
  TRUE Make the border more homogeneous in intensity, giving the appearance of a smoother curve.
  FALSE Do not make the border more homogeneous in intensity.
bShadow Boolean flag that indicates whether to add a shadow to the border. Possible values are:
  Value Meaning
  TRUE Add a shadow to the border.
  FALSE Do not add a shadow to the border. This is the default.
 

nShadowSize Value that indicates the width of the shadow, in pixels. This value is used only when bShadow is TRUE.
nShadowDirection Flag that indicates the direction of the shadow. This value is used only when bShadow is TRUE. Possible values are:
  Value Meaning
  BORDER_SHADOW_LEFT [0] The shadow is on the left top side of the image. This is the default.
  BORDER_SHADOW_RIGHT [1] The shadow is on the right bottom side of the image.
  BORDER_SHADOW_SURROUND [2] The shadow surrounds the border.
 

bBumpyShadow Boolean flag that indicates whether to increase the intensity near the far edge of the shadow. This flag is used only when bShadow is TRUE. Setting this flag to TRUE produces a good appearance for the shadow if nShadowSize is a value between 4 and 7. Possible values are:
  Value Meaning
  TRUE Increase the intensity near the far edge of the shadow.
  FALSE Do not increase the intensity near the far edge of the shadow.

Comments

pADDBORDERINFO is a pointer to a ADDBORDERINFO structure. Where a function parameter type is pADDBORDERINFO, declare an ADDBORDERINFO variable and pass the variable's address in the parameter. Declaring a pADDBORDERINFO variable is necessary only if the program requires a pointer.

Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() operator to calculate this value. Functions that do not require the structure be initialized will take the total size of the structure, in bytes, as an additional function parameter.

The images below demonstrate some of the borders that are possible, by setting various members and flags.

nStyle = BORDER_STYLE_OPAQUE

image\BdrOpq.gif

nStyle = BORDER_STYLE_OPAQUE

nEffectStyle = BORDER_EFFECT_CURVEDIN

nCurveIntesity = 200

image\BdrOpqCvdIn.gif

nStyle = BORDER_STYLE_OPAQUE

nEffectStyle = BORDER_EFFECT_CURVEDOUT

nCurveIntesity = 200

image\BdrOpqCvdOut.gif

nStyle = BORDER_STYLE_OPAQUE

nEffectStyle = BORDER_EFFECT_RAISED

nCurveIntesity = 100

image\BdrOpqRsd.gif

nStyle = BORDER_STYLE_OPAQUE

nEffectStyle = BORDER_EFFECT_RAISED

nCurveIntesity = 100

bSoftCurve = TRUE

image\BdrOpqRsdScrv.gif

nStyle = BORDER_STYLE_GRADIENT

nGradientStyle = BORDER_GRAD_INSIDEOUT

crGradientStart = RGB(255, 0, 0)

crGradientEnd = RGB(0, 0, 255)

image\BdrGradInOut.gif

nStyle = BORDER_STYLE_GRADIENT

nGradientStyle = BORDER_GRAD_CENTEROUT

crGradientStart = RGB(255, 0, 0)

crGradientEnd = RGB(0, 0, 255)

image\BdrGradCtrOut1.gif

nStyle = BORDER_STYLE_GRADIENT

nGradientStyle = BORDER_GRAD_CORNEROUT

crGradientStart = RGB(255, 0, 0)

crGradientEnd = RGB(0, 0, 255)

image\BdrGradCtrOut2.gif

nBorderLocation = BORDER_OUTSIDE

nStyle = BORDER_STYLE_OPAQUE

bShadow = TRUE

nShadowSize = 5

bBumpyShadow = TRUE

nShadowDirection = BORDER_SHADOW_SURROUND

image\BdrOpqOutShadSur.gif
Help Version 20.0.2018.7.30
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help