KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome 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 sampleDIBackColor property, Cannon sample