ComponentOne Gauges for WinForms
Working with Gauges for WinForms / Custom Pointer, Mark, and Cap Images
In This Topic
    Custom Pointer, Mark, and Cap Images
    In This Topic

    If neither of predefined shapes nor the custom shapes are suitable for your needs use the CustomImage property that allows to specify an image for using as a pointer, pointer cap, or tick mark.

    The Image is the main property of the C1GaugeCustomImage object. It can be assigned to a bitmap or metafile that will appear as a pointer or decorator. The Width and Height properties allow resizing the source image. The RotateFlipType property gives an ability to rotate and flip the source image. The Hue, Lightness, Saturation, and Opacity property modify the HLS and alpha settings of the source image. Actually, neither of these operations affects the source image assigned to the Image property. They work with a copy of the source image.

    The KeepAspectRatio and KeepSize properties impose a restriction on how the custom image can be resized in the target element, such as the pointer or the marks decorator. If the KeepSize property is True the Length and Width of the pointer, for example, don't affect the image size. If the KeepSize is False while the KeepAspectRatio property is True the image height may vary depending on the Length property of the target element. The image width changes correspondingly to maintain the aspect ratio of the custom image.

    It may be a good idea to collect all images in the C1Gauge.CommonImages and C1GaugeBase.CommonImages properties. You can reference an item from the CommonImages collection by assigning its name to the C1GaugeCustomImage.CommonImageName property or by selecting a common image name from the drop-down list of the CustomImage property editor in the property grid.

    See Also