|
| override void | Dispose (bool disposing) |
| | Clean up any resources being used. More...
|
| |
Definition at line 13 of file ColorTool.cs.
◆ ColorTool() [1/2]
| BioImager.ColorTool.ColorTool |
( |
| ) |
|
Definition at line 43 of file ColorTool.cs.
44 {
45 InitializeComponent();
47 }
◆ ColorTool() [2/2]
| BioImager.ColorTool.ColorTool |
( |
ColorS |
col, |
|
|
int |
bitPerPixel |
|
) |
| |
Definition at line 49 of file ColorTool.cs.
50 {
51 InitializeComponent();
52 this.bitsPerPixel = bitPerPixel;
53 if(bitsPerPixel == 8)
54 {
55 rBar.Maximum = 255;
56 gBar.Maximum = 255;
57 bBar.Maximum = 255;
58 redBox.Maximum = 255;
59 greenBox.Maximum = 255;
60 blueBox.Maximum = 255;
61 }
62 if (rBar.Maximum <= col.R)
63 rBar.Value = rBar.Maximum;
64 if (gBar.Maximum <= col.G)
65 gBar.Value = gBar.Maximum;
66 if (bBar.Maximum <= col.B)
67 bBar.Value = bBar.Maximum;
69 }
◆ Dispose()
| override void BioImager.ColorTool.Dispose |
( |
bool |
disposing | ) |
|
|
protected |
Clean up any resources being used.
- Parameters
-
| disposing | true if managed resources should be disposed; otherwise, false. |
Definition at line 14 of file ColorTool.Designer.cs.
15 {
16 if (disposing && (components != null))
17 {
18 components.Dispose();
19 }
20 base.Dispose(disposing);
21 }
◆ UpdateGUI()
| void BioImager.ColorTool.UpdateGUI |
( |
| ) |
|
It updates the GUI.
Definition at line 31 of file ColorTool.cs.
32 {
33 color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
34 colorPanel.BackColor = System.Drawing.Color.FromArgb(color.R / ushort.MaxValue,color.G / ushort.MaxValue,color.B / ushort.MaxValue);
35 if (rBar.Value != redBox.Value)
36 redBox.Value = rBar.Value;
37 if (gBar.Value != greenBox.Value)
38 greenBox.Value = gBar.Value;
39 if (bBar.Value != blueBox.Value)
40 blueBox.Value = bBar.Value;
41 }
◆ Color
| ColorS BioImager.ColorTool.Color |
|
getset |
Definition at line 18 of file ColorTool.cs.
19 {
20 get
21 {
22 return color;
23 }
24 set
25 {
26 color = value;
27 }
28 }
The documentation for this class was generated from the following files: