You are here: GdPicture.NET > Documentation > Classes > GdViewer Class > GdViewer Methods > Regions > AddRegion Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdViewer.AddRegion Method

Add a region on the current page of the displayed document.

C#
public int AddRegion(
    String Name, 
    int Left, 
    int Top, 
    int Width, 
    int Height, 
    ForegroundMixMode MixMode, 
    Color RegionColor
);
Visual Basic
Public Function AddRegion(
    ByVal Name As String, 
    ByVal Left As Integer, 
    ByVal Top As Integer, 
    ByVal Width As Integer, 
    ByVal Height As Integer, 
    ByVal MixMode As ForegroundMixMode, 
    ByVal RegionColor As Color
) As Integer
Parameters
Parameters 
Description 
Name 
The name of the region. Can be an empty string.  
Left 
Left pixel (0 based) position of the region on the page.  
Top 
Top pixel (0 based) position of the region on the page.  
Width 
Width, in pixel, of the rectangle of the region on the page.  
Height 
Height, in pixel, of the rectangle of the region on the page.  
MixMode 
A member of the ForegroundMixMode enumeration. Specifies the foreground mix mode to use to combine the region and the displayed image.  
RegionColor 
Color Object. You can build a Color Object using the ARGB() function. Color used to fill the rectangle.  
Returns

The ID of the added region.

Call the Redraw function to display the created region on the viewer.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.