Home Page > KernelCAD Models > Basics of 3D Graphics > Background
Background of KernelCAD Window
Background of KernelCAD Window
By default window of a KernelCAD component is created with a flat color
background controlled by
DIBackColor property. The background can display gradient colors of
various directions and configuration. To enable gradient background query
IKCContext
from IView
of the component and set the first (id=0) integer parameter to 1. To disable
gradient background set the parameter to 0. See
DIView sample for an example.
Gradient color of the window is defined by array of colors positioned
along the edge of the component window. The array of color has always at
least four colors at each corner. For example to make the background
horizontally gradient changing from blue to green set colors at two left
corners to blue and colors at two right hand corners to green. Adding colors
in the middle of window sides will make the background more complicated.
Colors of the components background can be manipulated with
IRectangleColor_KC
interface obtained via query: KernelCAD > GetView
> IView >
IIIRectangleColor_KC
The background can be transparent. To create a transparent background set
TransparBackgrEnabled
property to true and DIBackColor
property to zero. .NET applications must also set the Visible property of
the KernelCAD control to false using form editor at design time. See more in:
Dual mode.
Notice: Transparent background is available only on Windows Vista or later. On
systems prior to that the
TransparBackgrEnabled
property is ignored and the DIBackColor
is interpreted as usual, which means that value of 0 will make the background
black.
See also: DIView sample,
DIBackColor property,
Cannon sample
|