|
| override void | Dispose (bool disposing) |
| | Clean up any resources being used.
|
| |
Definition at line 3 of file ColorTool.Designer.cs.
◆ ColorTool() [1/2]
| BioImager.ColorTool.ColorTool |
( |
| ) |
|
Definition at line 44 of file ColorTool.cs.
45 {
46 InitializeComponent();
48 }
◆ ColorTool() [2/2]
| BioImager.ColorTool.ColorTool |
( |
ColorS | col, |
|
|
int | bitPerPixel ) |
Definition at line 50 of file ColorTool.cs.
51 {
52 InitializeComponent();
53 this.bitsPerPixel = bitPerPixel;
54 if(bitsPerPixel == 8)
55 {
56 rBar.Maximum = 255;
57 gBar.Maximum = 255;
58 bBar.Maximum = 255;
59 redBox.Maximum = 255;
60 greenBox.Maximum = 255;
61 blueBox.Maximum = 255;
62 }
63 if (rBar.Maximum <= col.R)
64 rBar.Value = rBar.Maximum;
65 if (gBar.Maximum <= col.G)
66 gBar.Value = gBar.Maximum;
67 if (bBar.Maximum <= col.B)
68 bBar.Value = bBar.Maximum;
70 }
◆ 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 32 of file ColorTool.cs.
33 {
34 color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
35 colorPanel.BackColor = System.Drawing.Color.FromArgb((int)(((float)color.R / (float)ushort.MaxValue) * 255),(int)(((float)color.G / (float)ushort.MaxValue) * 255),(int)(((float)color.B / (float)ushort.MaxValue) * 255));
36 if (rBar.Value != redBox.Value)
37 redBox.Value = rBar.Value;
38 if (gBar.Value != greenBox.Value)
39 greenBox.Value = gBar.Value;
40 if (bBar.Value != blueBox.Value)
41 blueBox.Value = bBar.Value;
42 }
◆ Color
| ColorS BioImager.ColorTool.Color |
|
getset |
Definition at line 19 of file ColorTool.cs.
20 {
21 get
22 {
23 return color;
24 }
25 set
26 {
27 color = value;
28 }
29 }
The documentation for this class was generated from the following files: