API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.SampleColorInArea method
Samples the average colors within an area
Syntax:
Function SampleColorInArea(ByVal x1 As Double, ByVal y1 As Double, ByVal x2 As Double, ByVal y2 As Double, ByVal XSamples As Long, ByVal YSamples As Long, Optional ByVal ColorType As cdrColorType = cdrColorMixed) As Color
Parameters:
Name Type Description
x1
Double
y1
Double
x2
Double
y2
Double
XSamples
Long
YSamples
Long
ColorType