Object Model Reference : Classes : C : Color : Methods : Color.BWAssign |
Sub BWAssign(White As Boolean)
Sub BWAssign(White As Boolean)
Member of Color
The BWAssign method sets a True or False value that assigns the black-and-white color model in CorelDRAW. With this method, True means white, and False means black.
A color is an effect applied to an object that alters the objects appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes.
The black-and-white color model is a 1-bit color mode that stores images as two solid colors black and white with no gradations. This color mode is useful for line art and simple graphics.
It is not necessary to check whether the object is black or white before setting its black-and-white property.
Parameter
|
Description
|
White
|
Specifies the appearance of white in the black-and-white color model
This value is a True or False value.
|
The following VBA example sets the fill of all uniformly filled objects on the current page to black-and-white.
Sub Test() |
Dim s As Shape |
For Each s In ActivePage.Shapes |
If s.Fill.Type = cdrUniformFill Then |
If s.Fill.UniformColor.Type = cdrColorBlackAndWhite Then |
s.Fill.UniformColor.BW = True |
Else |
s.Fill.UniformColor.BWAssign True |
End If |
End If |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.