From e56379f74fad4599fb27a1d7bb84d3aa655e322f Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sun, 27 Sep 2009 22:54:30 +0200 Subject: Class documentation for ColorWheel, ValueBar and color mapping units. --- docs/xml/gui/fpg_colormapping.xml | 39 ++++++++++---- docs/xml/gui/fpg_colorwheel.xml | 106 ++++++++++++++++++++++++++++++++++---- 2 files changed, 125 insertions(+), 20 deletions(-) (limited to 'docs/xml/gui') diff --git a/docs/xml/gui/fpg_colormapping.xml b/docs/xml/gui/fpg_colormapping.xml index 209a7095..8a348362 100644 --- a/docs/xml/gui/fpg_colormapping.xml +++ b/docs/xml/gui/fpg_colormapping.xml @@ -1,12 +1,31 @@ - + - - - - - - - - - + + + This unit contains some color conversion/mapping functions. + + + Map RGB colorspace to HSV colorspace. + This function converts a RGB (Red, Green, Blue) colorspace value to HSV (Hue, Saturation, Value) colorspace. The parameters have specific value ranges. Please see the parameter documentation for more details. + + + Map HSV colorspace to RGB colorspace. + + + Returned Hue value + The Hue range is from 0 - 1535. In that range, the primary colors are mapped to the following values. Red = 0. Green = 512 and Blue = 1024. + + + Returned Saturation value. + The Saturation value range is from 0.0 - 1.0. Grey (no color) = 0. Maximum color = 1.0. + + + Returned Value value. + The Value value range is from 0.0 to 1.0. Black being 0 and maximum brightness being 1.0. + + + Hue value + + + diff --git a/docs/xml/gui/fpg_colorwheel.xml b/docs/xml/gui/fpg_colorwheel.xml index 738654be..6340555b 100644 --- a/docs/xml/gui/fpg_colorwheel.xml +++ b/docs/xml/gui/fpg_colorwheel.xml @@ -1,12 +1,98 @@ - + - - - - - - - - - + + + The unit contains a ColorWheel and ValueBar component. + +

+ Using the components: +

+

Normally, you use both a color wheel and a value bar. +

+
    +
  1. Put a color wheel on your form.
  2. +
  3. Put a value bar on your form beside the wheel.
  4. +
  5. Set the ColorWheel's ValueBar property to the ValueBar component + you just put on the form.
  6. +
+

The two components are now linked together. When a selection is +made in the color wheel the value bar will update to show the range +for that selection. +

+

+ Note: you won't see the colors in the UI Designer. Colors will +only be displayed at runtime.

+

+ Reading and setting the color: +

+

To set the color being displayed, use the SetSelectedColor method + of the color wheel.

+

To read the color selected, read the SelectedColor property + of the ValueBar.

+

If you want to know when the user picks a color, you + can use the OnChange event in the ValueBar.

+
+ + A colorwheel component. + This component draws a ColorWheel at runtime. This allows the user to select the Hue and Saturation values in the HSV color range. + + + Size of the crosshair. + If the cursor size is set too big it will just 'clip' to the edge of the control. You can use this effect to get full cross hairs by making the CursorSize large. + + + The width of the black area around the wheel. + +

The margin is there so that when the cross hair is on the edge of the wheel, the complete cross hair can be drawn, without being clipped. It makes selecting colors on the edge of the colorwheel easier.

+

If the margin is set too large, the colorwheel will not be drawn / displayed.

+
+
+ + The percentage from the centre of the wheel. + The percentage of the radius from the centre of the wheel, that is held for pure white.This makes it possible to easily select the color white. The percentage range is 0% - 50% of the colorwheel. The cross hair will also snap to the centre of the wheel when it enters this radius range. + + + This event is triggered when a new color has been selected in the wheel. + + + Used to link the ColorWheel to the ValueBar component. + + + + + + Hue value of selected color. + + + Saturation value of selected color. + + + Sets a new color value programatically. + + + A ValueBar component. + At runtime, this component draws a ValueBar. It allows the user to select the brightness (Value) color in the HSV colorspace. This components works with the TfpgColorWheel component to set the full HSV color values. + + + Currently selected Value + The Value color range is from 0.0 to 1.0, where 0 is black and 1 is the brightest. + + + The selected HSV color but in TfpgColor format. + + + Margin width around the ValueBar. + + + Event is triggered when a new color is selected. + + + The height of the selection cursor. + + + Sets the Hue and Saturation values. + This method is normally called by the component. These components work together to specify the full HSV color. + +
+
-- cgit v1.2.3-70-g09d2