Previous Document Next Document
Bitmap.Inflate

Sub Inflate(Width As Long, Height As Long)

Member of Bitmap

The Inflate method increases the size of a bitmap by adding the specified number of pixels at each side of the bitmap.

Parameters
Description
Width
Specifies the number of pixels to add to each side
Height
Specifies the number of pixels to add to the top and bottom

The following code example increases the size of the active bitmap to at least 400 ?400 pixels.

Sub Test() 
 Dim s As Shape 
 For Each s In ActivePage.Shapes 
  If s.Type = cdrBitmapShape Then 
   With s.Bitmap 
    If .SizeWidth < 400 And .SizeHeight < 400 Then 
     .Inflate (400 - .SizeWidth)/2, (400 - .SizeHeight)/2 
    End If 
   End With 
  End If 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.