ZennoLab Assemblies Documentation
DrawPartToBitmap Method
See Also  Example Send Feedback
ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > HtmlElement Class : DrawPartToBitmap Method
left

Type: System.Int32

The distance, in pixels, between the left edge of the element and the left edge of its client area.

top

Type: System.Int32

The distance, in pixels, between the top edge of the element and the top edge of its client area.

width

Type: System.Int32

The width of the part.

height

Type: System.Int32

The height of the part.

isImage

Type: System.Boolean

true if the tag of this of the element is "img", otherwise, false.

Glossary Item Box

Supports rendering part of element to the bitmap.

Syntax

C# 
public string DrawPartToBitmap( 
   int left,
   int top,
   int width,
   int height,
   bool isImage
)

Parameters

left

Type: System.Int32

The distance, in pixels, between the left edge of the element and the left edge of its client area.

top

Type: System.Int32

The distance, in pixels, between the top edge of the element and the top edge of its client area.

width

Type: System.Int32

The width of the part.

height

Type: System.Int32

The height of the part.

isImage

Type: System.Boolean

true if the tag of this of the element is "img", otherwise, false.

Return Value

Type: System.String

The part of image as a string value.

Remarks

If the html element has the tag "img" and the method's parameter is true, then this method executes faster.

Example

The following code example demonstrates uses of the DrawPartToBitmap method
C#Copy Code
// find element by attribute
HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByAttribute("a", "href", "http://lessons.zennolab.com/ru/index", "regexp", 0);
 
// draw part of bitmap to the string value
string toBitmap = he.DrawPartToBitmap(0, 0, 20, 20, true);
PHPCopy Code
// find element by attribute
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByAttribute("a", "href", "http://lessons.zennolab.com/ru/index", "regexp", 0);
 
// draw part of bitmap to the string value
$toBitmap = $he->DrawPartToBitmap(0, 0, 20, 20, true);

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2014 All Rights Reserved.