You've already forked lazarus-ccr
jvcllaz: Add full color controls and dialogs
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6684 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
972
components/jvcllaz/run/JvMM/jvfullcolorcircleform.lfm
Normal file
972
components/jvcllaz/run/JvMM/jvfullcolorcircleform.lfm
Normal file
@ -0,0 +1,972 @@
|
||||
object JvFullColorCircleFrm: TJvFullColorCircleFrm
|
||||
Left = 274
|
||||
Height = 573
|
||||
Top = 219
|
||||
Width = 997
|
||||
AutoSize = True
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Color circle configurations'
|
||||
ClientHeight = 573
|
||||
ClientWidth = 997
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
LCLVersion = '2.1.0.0'
|
||||
object LabelOld: TLabel
|
||||
AnchorSideLeft.Control = PanelImageOld
|
||||
AnchorSideTop.Control = JvColorSpaceCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 72
|
||||
Height = 15
|
||||
Top = 58
|
||||
Width = 22
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Old:'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelNew: TLabel
|
||||
AnchorSideLeft.Control = PanelImageNew
|
||||
AnchorSideTop.Control = LabelOld
|
||||
Left = 216
|
||||
Height = 15
|
||||
Top = 58
|
||||
Width = 27
|
||||
Caption = 'New:'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelColorSpace: TLabel
|
||||
AnchorSideLeft.Control = JvColorSpaceCombo
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 103
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 66
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&Color Space:'
|
||||
ParentColor = False
|
||||
end
|
||||
object PanelGraphics: TPanel
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonOK
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 412
|
||||
Height = 550
|
||||
Top = 8
|
||||
Width = 577
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 8
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Caption = 'PanelGraphics'
|
||||
ClientHeight = 550
|
||||
ClientWidth = 577
|
||||
TabOrder = 5
|
||||
object LabelAxisSettings: TLabel
|
||||
AnchorSideLeft.Control = JvColorAxisConfigCombo
|
||||
AnchorSideTop.Control = PanelGraphics
|
||||
Left = 201
|
||||
Height = 15
|
||||
Top = 10
|
||||
Width = 69
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'A&xis Settings:'
|
||||
FocusControl = JvColorAxisConfigCombo
|
||||
ParentColor = False
|
||||
end
|
||||
object JvColorCircle: TJvFullColorCircle
|
||||
AnchorSideLeft.Control = Bevel10
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = JvColorAxisConfigCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = PanelGraphics
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = PanelGraphics
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 100
|
||||
Height = 480
|
||||
Top = 60
|
||||
Width = 459
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 16
|
||||
BorderSpacing.Bottom = 8
|
||||
FullColor = 83886079
|
||||
AxisConfig = acYZX
|
||||
TabOrder = 1
|
||||
OnColorChange = JvColorCircleColorChange
|
||||
OnColorSpaceChange = JvColorCircleColorSpaceChange
|
||||
CrossSize = 10
|
||||
CrossCenter = 3
|
||||
CrossStyle.Width = 3
|
||||
LineWidth = 0
|
||||
RedTrackBar = JvFullColorTrackBarRed
|
||||
GreenTrackBar = JvFullColorTrackBarGreen
|
||||
BlueTrackBar = JvFullColorTrackBarBlue
|
||||
CommonTrackBar = JvFullColorTrackBarCommon
|
||||
OnRedColorChange = JvColorCircleRedColorChange
|
||||
OnGreenColorChange = JvColorCircleGreenColorChange
|
||||
OnBlueColorChange = JvColorCircleBlueColorChange
|
||||
end
|
||||
object JvFullColorTrackBarCommon: TJvFullColorTrackBar
|
||||
AnchorSideTop.Control = JvColorCircle
|
||||
AnchorSideBottom.Control = Bevel10
|
||||
Left = 40
|
||||
Height = 237
|
||||
Top = 60
|
||||
Width = 21
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
FullColor = 83886079
|
||||
AxisConfig = acYZX
|
||||
TabOrder = 2
|
||||
ArrowWidth = 10
|
||||
ColorOrientation = coInverse
|
||||
Orientation = trVertical
|
||||
end
|
||||
object JvFullColorTrackBarBlue: TJvFullColorTrackBar
|
||||
AnchorSideLeft.Control = JvFullColorTrackBarGreen
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Bevel10
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = JvFullColorTrackBarRed
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 68
|
||||
Height = 237
|
||||
Top = 303
|
||||
Width = 21
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
FullColor = 83820544
|
||||
AxisConfig = acYZX
|
||||
TabOrder = 5
|
||||
ArrowColor = clBlue
|
||||
ArrowWidth = 10
|
||||
ColorOrientation = coInverse
|
||||
Orientation = trVertical
|
||||
end
|
||||
object JvFullColorTrackBarGreen: TJvFullColorTrackBar
|
||||
AnchorSideLeft.Control = JvFullColorTrackBarRed
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Bevel10
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = JvFullColorTrackBarRed
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 39
|
||||
Height = 237
|
||||
Top = 303
|
||||
Width = 21
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
FullColor = 67174144
|
||||
AxisConfig = acYZX
|
||||
TabOrder = 4
|
||||
ArrowColor = clLime
|
||||
ArrowWidth = 10
|
||||
ColorOrientation = coInverse
|
||||
Orientation = trVertical
|
||||
end
|
||||
object JvFullColorTrackBarRed: TJvFullColorTrackBar
|
||||
AnchorSideLeft.Control = PanelGraphics
|
||||
AnchorSideTop.Control = Bevel10
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = JvColorCircle
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 10
|
||||
Height = 237
|
||||
Top = 303
|
||||
Width = 21
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
FullColor = 67109119
|
||||
AxisConfig = acYZX
|
||||
TabOrder = 3
|
||||
ArrowColor = clRed
|
||||
ArrowWidth = 10
|
||||
ColorOrientation = coInverse
|
||||
Orientation = trVertical
|
||||
end
|
||||
object JvColorAxisConfigCombo: TJvFullColorAxisCombo
|
||||
AnchorSideLeft.Control = JvColorCircle
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = LabelAxisSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 201
|
||||
Height = 23
|
||||
Top = 29
|
||||
Width = 257
|
||||
Selected = acXYZ
|
||||
BorderSpacing.Top = 4
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
OnChange = JvColorAxisConfigComboChange
|
||||
end
|
||||
object Bevel10: TBevel
|
||||
AnchorSideLeft.Control = PanelGraphics
|
||||
AnchorSideTop.Control = JvColorCircle
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 2
|
||||
Height = 6
|
||||
Top = 297
|
||||
Width = 90
|
||||
end
|
||||
end
|
||||
object PanelCommonSettings: TPanel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = PanelImageOld
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 95
|
||||
Top = 211
|
||||
Width = 380
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 16
|
||||
BorderSpacing.Right = 16
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 95
|
||||
ClientWidth = 380
|
||||
TabOrder = 2
|
||||
object LabelComAxis0: TLabel
|
||||
AnchorSideLeft.Control = SpinEditComAxis0
|
||||
AnchorSideTop.Control = PanelCommonSettings
|
||||
Left = 82
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 81
|
||||
BorderSpacing.Top = 14
|
||||
Caption = 'LabelComAxis0'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelComAxis1: TLabel
|
||||
AnchorSideLeft.Control = SpinEditComAxis1
|
||||
AnchorSideTop.Control = LabelComAxis0
|
||||
Left = 178
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 81
|
||||
Caption = 'LabelComAxis1'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelComAxis2: TLabel
|
||||
AnchorSideLeft.Control = SpinEditComAxis2
|
||||
AnchorSideTop.Control = LabelComAxis0
|
||||
Left = 274
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 81
|
||||
Caption = 'LabelComAxis2'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelCommon: TLabel
|
||||
AnchorSideTop.Control = SpinEditComAxis0
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = LabelComAxis0
|
||||
Left = 20
|
||||
Height = 15
|
||||
Top = 39
|
||||
Width = 54
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'C&ommon:'
|
||||
FocusControl = SpinEditComAxis0
|
||||
ParentColor = False
|
||||
end
|
||||
object SpinEditComAxis0: TSpinEdit
|
||||
Tag = 48
|
||||
AnchorSideLeft.Control = Bevel2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelComAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
Enabled = False
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object SpinEditComAxis1: TSpinEdit
|
||||
Tag = 49
|
||||
AnchorSideLeft.Control = Bevel3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelComAxis1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object SpinEditComAxis2: TSpinEdit
|
||||
Tag = 50
|
||||
AnchorSideLeft.Control = Bevel4
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelComAxis2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckBoxCom0: TCheckBox
|
||||
Tag = 48
|
||||
AnchorSideLeft.Control = SpinEditComAxis0
|
||||
AnchorSideTop.Control = SpinEditComAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 104
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxCom0'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object CheckBoxCom1: TCheckBox
|
||||
Tag = 49
|
||||
AnchorSideLeft.Control = SpinEditComAxis1
|
||||
AnchorSideTop.Control = CheckBoxCom0
|
||||
Left = 178
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 104
|
||||
Caption = 'CheckBoxCom1'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 4
|
||||
end
|
||||
object CheckBoxCom2: TCheckBox
|
||||
Tag = 50
|
||||
AnchorSideLeft.Control = SpinEditComAxis2
|
||||
AnchorSideTop.Control = CheckBoxCom0
|
||||
Left = 274
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 104
|
||||
Caption = 'CheckBoxCom2'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object Bevel2: TBevel
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideTop.Control = CheckBoxCom0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 2
|
||||
Height = 12
|
||||
Top = 81
|
||||
Width = 80
|
||||
Constraints.MinWidth = 80
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel3: TBevel
|
||||
AnchorSideLeft.Control = Bevel2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxCom0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 12
|
||||
Top = 81
|
||||
Width = 96
|
||||
Constraints.MinWidth = 96
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel4: TBevel
|
||||
AnchorSideLeft.Control = Bevel3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Bevel2
|
||||
Left = 178
|
||||
Height = 12
|
||||
Top = 81
|
||||
Width = 96
|
||||
Constraints.MinWidth = 96
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel5: TBevel
|
||||
AnchorSideLeft.Control = Bevel4
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Bevel2
|
||||
Left = 274
|
||||
Height = 12
|
||||
Top = 81
|
||||
Width = 80
|
||||
Constraints.MinWidth = 80
|
||||
Shape = bsSpacer
|
||||
end
|
||||
end
|
||||
object PanelAxisSettings: TPanel
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideTop.Control = PanelCommonSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = PanelCommonSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 203
|
||||
Top = 322
|
||||
Width = 380
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 16
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 203
|
||||
ClientWidth = 380
|
||||
TabOrder = 4
|
||||
object LabelAxis0: TLabel
|
||||
AnchorSideLeft.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Control = PanelAxisSettings
|
||||
Left = 82
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 55
|
||||
BorderSpacing.Top = 14
|
||||
Caption = 'LabelAxis0'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelAxis1: TLabel
|
||||
AnchorSideLeft.Control = SpinEditRedAxis1
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
Left = 178
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 55
|
||||
Caption = 'LabelAxis1'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelAxis2: TLabel
|
||||
AnchorSideLeft.Control = SpinEditRedAxis2
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
Left = 274
|
||||
Height = 15
|
||||
Top = 16
|
||||
Width = 55
|
||||
Caption = 'LabelAxis2'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelRed: TLabel
|
||||
AnchorSideTop.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = SpinEditRedAxis0
|
||||
Left = 51
|
||||
Height = 15
|
||||
Top = 39
|
||||
Width = 23
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Caption = '&Red:'
|
||||
FocusControl = SpinEditRedAxis0
|
||||
ParentBidiMode = False
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelGreen: TLabel
|
||||
AnchorSideTop.Control = SpinEditGreenAxis0
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = SpinEditRedAxis0
|
||||
Left = 40
|
||||
Height = 15
|
||||
Top = 93
|
||||
Width = 34
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Caption = '&Green:'
|
||||
FocusControl = SpinEditGreenAxis0
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelBlue: TLabel
|
||||
AnchorSideTop.Control = SpinEditBlueAxis0
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = SpinEditRedAxis0
|
||||
Left = 48
|
||||
Height = 15
|
||||
Top = 147
|
||||
Width = 26
|
||||
Alignment = taRightJustify
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
Caption = '&Blue:'
|
||||
FocusControl = SpinEditBlueAxis0
|
||||
ParentColor = False
|
||||
end
|
||||
object SpinEditRedAxis0: TSpinEdit
|
||||
AnchorSideLeft.Control = Bevel6
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object SpinEditGreenAxis0: TSpinEdit
|
||||
Tag = 16
|
||||
AnchorSideLeft.Control = Bevel6
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxRed0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 23
|
||||
Top = 89
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 6
|
||||
end
|
||||
object SpinEditBlueAxis0: TSpinEdit
|
||||
Tag = 32
|
||||
AnchorSideLeft.Control = Bevel6
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxGreen0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 23
|
||||
Top = 143
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 12
|
||||
end
|
||||
object SpinEditRedAxis1: TSpinEdit
|
||||
Tag = 1
|
||||
AnchorSideLeft.Control = Bevel7
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object SpinEditRedAxis2: TSpinEdit
|
||||
Tag = 2
|
||||
AnchorSideLeft.Control = Bevel8
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 23
|
||||
Top = 35
|
||||
Width = 57
|
||||
BorderSpacing.Top = 4
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object SpinEditGreenAxis1: TSpinEdit
|
||||
Tag = 17
|
||||
AnchorSideLeft.Control = Bevel7
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxRed0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 23
|
||||
Top = 89
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 7
|
||||
end
|
||||
object SpinEditGreenAxis2: TSpinEdit
|
||||
Tag = 18
|
||||
AnchorSideLeft.Control = Bevel8
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxRed0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 23
|
||||
Top = 89
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 8
|
||||
end
|
||||
object SpinEditBlueAxis1: TSpinEdit
|
||||
Tag = 33
|
||||
AnchorSideLeft.Control = Bevel7
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxGreen0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 23
|
||||
Top = 143
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 13
|
||||
end
|
||||
object SpinEditBlueAxis2: TSpinEdit
|
||||
Tag = 34
|
||||
AnchorSideLeft.Control = Bevel8
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxGreen0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 23
|
||||
Top = 143
|
||||
Width = 57
|
||||
BorderSpacing.Top = 8
|
||||
OnChange = SpinEditSettingsValueChange
|
||||
TabOrder = 14
|
||||
end
|
||||
object CheckBoxRed0: TCheckBox
|
||||
AnchorSideLeft.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 98
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxRed0'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object CheckBoxRed1: TCheckBox
|
||||
Tag = 1
|
||||
AnchorSideLeft.Control = SpinEditRedAxis1
|
||||
AnchorSideTop.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 98
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxRed1'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 4
|
||||
end
|
||||
object CheckBoxRed2: TCheckBox
|
||||
Tag = 2
|
||||
AnchorSideLeft.Control = SpinEditRedAxis2
|
||||
AnchorSideTop.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 98
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxRed2'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object CheckBoxGreen0: TCheckBox
|
||||
Tag = 16
|
||||
AnchorSideLeft.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Control = SpinEditGreenAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 19
|
||||
Top = 116
|
||||
Width = 109
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxGreen0'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 9
|
||||
end
|
||||
object CheckBoxGreen1: TCheckBox
|
||||
Tag = 17
|
||||
AnchorSideLeft.Control = SpinEditRedAxis1
|
||||
AnchorSideTop.Control = SpinEditGreenAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 19
|
||||
Top = 116
|
||||
Width = 109
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxGreen1'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 10
|
||||
end
|
||||
object CheckBoxGreen2: TCheckBox
|
||||
Tag = 18
|
||||
AnchorSideLeft.Control = SpinEditRedAxis2
|
||||
AnchorSideTop.Control = SpinEditGreenAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 19
|
||||
Top = 116
|
||||
Width = 109
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxGreen2'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 11
|
||||
end
|
||||
object CheckBoxBlue0: TCheckBox
|
||||
Tag = 32
|
||||
AnchorSideLeft.Control = SpinEditRedAxis0
|
||||
AnchorSideTop.Control = SpinEditBlueAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 19
|
||||
Top = 170
|
||||
Width = 101
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxBlue0'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 15
|
||||
end
|
||||
object CheckBoxBlue1: TCheckBox
|
||||
Tag = 33
|
||||
AnchorSideLeft.Control = SpinEditRedAxis1
|
||||
AnchorSideTop.Control = SpinEditBlueAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 19
|
||||
Top = 170
|
||||
Width = 101
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxBlue1'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 16
|
||||
end
|
||||
object CheckBoxBlue2: TCheckBox
|
||||
Tag = 34
|
||||
AnchorSideLeft.Control = SpinEditRedAxis2
|
||||
AnchorSideTop.Control = SpinEditBlueAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 19
|
||||
Top = 170
|
||||
Width = 101
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'CheckBoxBlue2'
|
||||
OnClick = CheckBoxSettingsClick
|
||||
TabOrder = 17
|
||||
end
|
||||
object Bevel6: TBevel
|
||||
AnchorSideLeft.Control = PanelAxisSettings
|
||||
AnchorSideTop.Control = CheckBoxBlue0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 2
|
||||
Height = 12
|
||||
Top = 189
|
||||
Width = 80
|
||||
Constraints.MinWidth = 80
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel7: TBevel
|
||||
AnchorSideLeft.Control = Bevel6
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxBlue0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 82
|
||||
Height = 12
|
||||
Top = 189
|
||||
Width = 96
|
||||
Constraints.MinWidth = 96
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel8: TBevel
|
||||
AnchorSideLeft.Control = Bevel7
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxBlue0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 178
|
||||
Height = 12
|
||||
Top = 189
|
||||
Width = 96
|
||||
Constraints.MinWidth = 96
|
||||
Shape = bsSpacer
|
||||
end
|
||||
object Bevel9: TBevel
|
||||
AnchorSideLeft.Control = Bevel8
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBoxBlue0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 274
|
||||
Height = 12
|
||||
Top = 189
|
||||
Width = 80
|
||||
Constraints.MinWidth = 80
|
||||
Shape = bsSpacer
|
||||
end
|
||||
end
|
||||
object RadioButtonCommonSettings: TRadioButton
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideTop.Control = PanelImageOld
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 19
|
||||
Top = 203
|
||||
Width = 119
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
Caption = 'Co&mmon Settings:'
|
||||
OnClick = RadioButtonAxisClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object RadioButtonAxisSettings: TRadioButton
|
||||
AnchorSideLeft.Control = PanelAxisSettings
|
||||
AnchorSideTop.Control = PanelCommonSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 24
|
||||
Height = 19
|
||||
Top = 314
|
||||
Width = 89
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&Axis Settings:'
|
||||
OnClick = RadioButtonAxisClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object ButtonGraphics: TButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
AnchorSideRight.Control = PanelAxisSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 288
|
||||
Height = 25
|
||||
Top = 534
|
||||
Width = 108
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 1
|
||||
Caption = 'ButtonGraphics'
|
||||
Constraints.MinWidth = 75
|
||||
OnClick = ButtonGraphicsClick
|
||||
TabOrder = 9
|
||||
end
|
||||
object ButtonCancel: TButton
|
||||
AnchorSideLeft.Control = ButtonOK
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
Left = 99
|
||||
Height = 25
|
||||
Top = 534
|
||||
Width = 75
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 1
|
||||
Cancel = True
|
||||
Caption = 'Ca&ncel'
|
||||
Constraints.MinWidth = 75
|
||||
ModalResult = 2
|
||||
TabOrder = 7
|
||||
end
|
||||
object ButtonOK: TButton
|
||||
AnchorSideLeft.Control = PanelAxisSettings
|
||||
AnchorSideTop.Control = PanelAxisSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 533
|
||||
Width = 75
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Bottom = 16
|
||||
Caption = '&OK'
|
||||
Constraints.MinWidth = 75
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 6
|
||||
end
|
||||
object ButtonApply: TButton
|
||||
AnchorSideLeft.Control = ButtonCancel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
Left = 182
|
||||
Height = 25
|
||||
Top = 534
|
||||
Width = 75
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 1
|
||||
Caption = '&Apply'
|
||||
OnClick = ButtonApplyClick
|
||||
TabOrder = 8
|
||||
end
|
||||
object JvColorSpaceCombo: TJvFullColorSpaceCombo
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 103
|
||||
Height = 23
|
||||
Top = 27
|
||||
Width = 206
|
||||
AllowVariable = False
|
||||
BorderSpacing.Top = 4
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
OnChange = JvColorSpaceComboChange
|
||||
end
|
||||
object Bevel1: TBevel
|
||||
AnchorSideLeft.Control = PanelCommonSettings
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 196
|
||||
Height = 62
|
||||
Top = 77
|
||||
Width = 20
|
||||
end
|
||||
object PanelImageOld: TPanel
|
||||
AnchorSideLeft.Control = LabelOld
|
||||
AnchorSideTop.Control = LabelOld
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Bevel1
|
||||
Left = 72
|
||||
Height = 118
|
||||
Top = 77
|
||||
Width = 124
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 118
|
||||
ClientWidth = 124
|
||||
TabOrder = 10
|
||||
object ImageOld: TImage
|
||||
Left = 3
|
||||
Height = 112
|
||||
Top = 3
|
||||
Width = 118
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 2
|
||||
end
|
||||
end
|
||||
object PanelImageNew: TPanel
|
||||
AnchorSideLeft.Control = Bevel1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelOld
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Bevel1
|
||||
Left = 216
|
||||
Height = 118
|
||||
Top = 77
|
||||
Width = 124
|
||||
BorderSpacing.Top = 4
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 118
|
||||
ClientWidth = 124
|
||||
TabOrder = 11
|
||||
object ImageNew: TImage
|
||||
Left = 3
|
||||
Height = 112
|
||||
Top = 3
|
||||
Width = 118
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 2
|
||||
end
|
||||
end
|
||||
end
|
1001
components/jvcllaz/run/JvMM/jvfullcolorcircleform.pas
Normal file
1001
components/jvcllaz/run/JvMM/jvfullcolorcircleform.pas
Normal file
File diff suppressed because it is too large
Load Diff
3886
components/jvcllaz/run/JvMM/jvfullcolorctrls.pas
Normal file
3886
components/jvcllaz/run/JvMM/jvfullcolorctrls.pas
Normal file
File diff suppressed because it is too large
Load Diff
467
components/jvcllaz/run/JvMM/jvfullcolordialogs.pas
Normal file
467
components/jvcllaz/run/JvMM/jvfullcolordialogs.pas
Normal file
@ -0,0 +1,467 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
||||
the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is: ColorDialogs.pas, released on 2004-09-11.
|
||||
|
||||
The Initial Developer of the Original Code is Florent Ouchet [ouchet dott florent att laposte dott net]
|
||||
Portions created by Florent Ouchet are Copyright (C) 2004 Florent Ouchet.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s): -
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvFullColorDialogs;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Graphics, Forms,
|
||||
JvFullColorSpaces, JvFullColorRotate;
|
||||
|
||||
type
|
||||
TJvFullColorDialogOption =
|
||||
(foFullOpen, foPreventExpand, foShowHelp,
|
||||
foAllowSpaceChange, foConvertToOriginalSpace,
|
||||
foShowNewPreview, foShowOldPreview,
|
||||
foShowPredefined, foAllowVariable,
|
||||
foNoneAndDefault, foShowApply);
|
||||
TJvFullColorDialogOptions = set of TJvFullColorDialogOption;
|
||||
|
||||
TJvFullColorCircleDialogOption =
|
||||
(coFullOpen, coPreventExpand,
|
||||
coShowHelp, coAllowSpaceChange,
|
||||
coShowNewPreview, coShowOldPreview,
|
||||
coCommon, coRed, coGreen, coBlue,
|
||||
coShowSaturation, coDefaultRange,
|
||||
coShowApply);
|
||||
TJvFullColorCircleDialogOptions = set of TJvFullColorCircleDialogOption;
|
||||
|
||||
const
|
||||
JvDefaultFullColorDialogOptions =
|
||||
[foFullOpen, foAllowSpaceChange, foAllowVariable,
|
||||
foShowNewPreview, foShowOldPreview, foShowPredefined, foShowApply];
|
||||
|
||||
JvDefaultColorCircleDialogOptions =
|
||||
[coFullOpen, coAllowSpaceChange,
|
||||
coShowNewPreview, coShowOldPreview,
|
||||
coCommon, coRed, coGreen, coBlue,
|
||||
coShowSaturation, coShowApply];
|
||||
|
||||
type
|
||||
TJvAxisType = (atCommon, atRed, atGreen, atBlue);
|
||||
|
||||
TJvFullColorEvent = procedure(Sender: TObject; AFullColor: TJvFullColor) of object;
|
||||
|
||||
TJvColorCircleEvent = procedure(Sender: TObject) of object;
|
||||
|
||||
TJvFullColorDialog = class;
|
||||
TJvFullColorCircleDialog = class;
|
||||
|
||||
TJvFullColorDialog = class(TComponent)
|
||||
private
|
||||
FOptions: TJvFullColorDialogOptions;
|
||||
FTitle: string;
|
||||
FFullColor: TJvFullColor;
|
||||
FOnApply: TJvFullColorEvent;
|
||||
FForm: TForm;
|
||||
FOnCloseQuery: TCloseQueryEvent;
|
||||
FOnShow: TNotifyEvent;
|
||||
FHelpContext: THelpContext;
|
||||
FOldColorSpace: TJvFullColorSpaceID;
|
||||
FDropDownCount: Integer;
|
||||
function GetColor: TColor;
|
||||
function GetFullColor: TJvFullColor;
|
||||
procedure SetFullColor(const Value: TJvFullColor);
|
||||
procedure SetHelpContext(const Value: THelpContext);
|
||||
procedure SetOptions(const Value: TJvFullColorDialogOptions);
|
||||
procedure SetTitle(const Value: string);
|
||||
protected
|
||||
procedure FormApply(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
property OldColorSpace: TJvFullColorSpaceID read FOldColorSpace;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
function Execute: Boolean;
|
||||
property Form: TForm read FForm;
|
||||
property Color: TColor read GetColor;
|
||||
published
|
||||
property DropDownCount: Integer read FDropDownCount write FDropDownCount default 8;
|
||||
property FullColor: TJvFullColor read GetFullColor write SetFullColor default fclRGBBlack;
|
||||
property Options: TJvFullColorDialogOptions read FOptions write SetOptions default JvDefaultFullColorDialogOptions;
|
||||
property Title: string read FTitle write SetTitle;
|
||||
property HelpContext: THelpContext read FHelpContext write SetHelpContext default 0;
|
||||
property OnApply: TJvFullColorEvent read FOnApply write FOnApply;
|
||||
property OnShow: TNotifyEvent read FOnShow write FOnShow;
|
||||
property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery;
|
||||
end;
|
||||
|
||||
TJvFullColorCircleDialog = class(TComponent)
|
||||
private
|
||||
FTitle: string;
|
||||
FForm: TForm;
|
||||
FHelpContext: THelpContext;
|
||||
FOnCloseQuery: TCloseQueryEvent;
|
||||
FOnShow: TNotifyEvent;
|
||||
FOptions: TJvFullColorCircleDialogOptions;
|
||||
FOnApply: TJvColorCircleEvent;
|
||||
FDelta: TJvColorDelta;
|
||||
FDropdownCount: Integer;
|
||||
procedure SetHelpContext(const Value: THelpContext);
|
||||
procedure SetOptions(const Value: TJvFullColorCircleDialogOptions);
|
||||
procedure SetTitle(const Value: string);
|
||||
procedure SetColorID(const Value: TJvFullColorSpaceID);
|
||||
procedure SetBlueDelta(const Value: TJvAxisDelta);
|
||||
procedure SetGreenDelta(const Value: TJvAxisDelta);
|
||||
procedure SetRedDelta(const Value: TJvAxisDelta);
|
||||
function GetRedDelta: TJvAxisDelta;
|
||||
function GetGreenDelta: TJvAxisDelta;
|
||||
function GetBlueDelta: TJvAxisDelta;
|
||||
function GetColorID: TJvFullColorSpaceID;
|
||||
protected
|
||||
procedure FormApply(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
function Execute: Boolean;
|
||||
property Form: TForm read FForm;
|
||||
property RedDelta: TJvAxisDelta read GetRedDelta write SetRedDelta;
|
||||
property GreenDelta: TJvAxisDelta read GetGreenDelta write SetGreenDelta;
|
||||
property BlueDelta: TJvAxisDelta read GetBlueDelta write SetBlueDelta;
|
||||
property ColorID: TJvFullColorSpaceID read GetColorID write SetColorID;
|
||||
property Delta: TJvColorDelta read FDelta;
|
||||
published
|
||||
// (rom) set default values
|
||||
property DropdownCount: Integer read FDropdownCount write FDropDownCount default 8;
|
||||
property Options: TJvFullColorCircleDialogOptions
|
||||
read FOptions write SetOptions default JvDefaultColorCircleDialogOptions;
|
||||
property Title: string read FTitle write SetTitle;
|
||||
property HelpContext: THelpContext read FHelpContext write SetHelpContext;
|
||||
property OnApply: TJvColorCircleEvent read FOnApply write FOnApply;
|
||||
property OnShow: TNotifyEvent read FOnShow write FOnShow;
|
||||
property OnCloseQuery: TCloseQueryEvent read FOnCloseQuery write FOnCloseQuery;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvResources,
|
||||
Controls, SysUtils, JvFullColorForm, JvFullColorCircleForm;
|
||||
|
||||
//=== { TJvFullColorDialog } =================================================
|
||||
|
||||
constructor TJvFullColorDialog.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FOptions := JvDefaultFullColorDialogOptions;
|
||||
FFullColor := fclRGBBlack;
|
||||
FDropDownCount := 8;
|
||||
end;
|
||||
|
||||
function TJvFullColorDialog.Execute: Boolean;
|
||||
var
|
||||
NewColor: TJvFullColor;
|
||||
begin
|
||||
FOldColorSpace := ColorSpaceManager.GetColorSpaceID(FullColor);
|
||||
|
||||
FForm := TJvFullColorFrm.Create(Application, FFullColor, FOptions);
|
||||
with TJvFullColorFrm(Form) do
|
||||
begin
|
||||
if Title <> '' then
|
||||
Caption := FTitle;
|
||||
DropdownCount := FDropDownCount;
|
||||
OnApply := @FormApply;
|
||||
OnClose := @FormClose;
|
||||
OnShow := @FormShow;
|
||||
HelpContext := Self.HelpContext;
|
||||
Result := (ShowModal = mrOk);
|
||||
NewColor := FullColor;
|
||||
end;
|
||||
FreeAndNil(FForm);
|
||||
|
||||
with ColorSpaceManager do
|
||||
if foConvertToOriginalSpace in Options then
|
||||
NewColor := ConvertToID(NewColor, OldColorSpace);
|
||||
FFullColor := NewColor;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.FormApply(Sender: TObject);
|
||||
var
|
||||
lColor: TJvFullColor;
|
||||
begin
|
||||
if Assigned(FForm) then
|
||||
begin
|
||||
lColor := TJvFullColorFrm(Form).FullColor;
|
||||
if foConvertToOriginalSpace in Options then
|
||||
lColor := ColorSpaceManager.ConvertToID(lColor, OldColorSpace);
|
||||
if Assigned(FOnApply) then
|
||||
FOnApply(Self, lColor);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.FormClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
var
|
||||
Allow: Boolean;
|
||||
begin
|
||||
Allow := True;
|
||||
|
||||
if Assigned(FOnCloseQuery) then
|
||||
FOnCloseQuery(Self, Allow);
|
||||
|
||||
if Allow then
|
||||
CloseAction := caFree
|
||||
else
|
||||
CloseAction := caNone;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.FormShow(Sender: TObject);
|
||||
begin
|
||||
if Assigned(FOnShow) then
|
||||
FOnShow(Self);
|
||||
end;
|
||||
|
||||
function TJvFullColorDialog.GetColor: TColor;
|
||||
begin
|
||||
Result := ColorSpaceManager.ConvertToColor(FullColor);
|
||||
end;
|
||||
|
||||
function TJvFullColorDialog.GetFullColor: TJvFullColor;
|
||||
begin
|
||||
if Form <> nil then
|
||||
FFullColor := TJvFullColorFrm(Form).FullColor;
|
||||
Result := FFullColor;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.SetFullColor(const Value: TJvFullColor);
|
||||
begin
|
||||
FFullColor := Value;
|
||||
if Form <> nil then
|
||||
TJvFullColorFrm(Form).FullColor := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.SetHelpContext(const Value: THelpContext);
|
||||
begin
|
||||
if FHelpContext <> Value then
|
||||
begin
|
||||
FHelpContext := Value;
|
||||
if Assigned(FForm) then
|
||||
Form.HelpContext := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.SetOptions(const Value: TJvFullColorDialogOptions);
|
||||
begin
|
||||
if FOptions <> Value then
|
||||
begin
|
||||
FOptions := Value;
|
||||
if Assigned(FForm) then
|
||||
TJvFullColorFrm(Form).Options := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorDialog.SetTitle(const Value: string);
|
||||
begin
|
||||
if FTitle <> Value then
|
||||
begin
|
||||
FTitle := Value;
|
||||
if Assigned(FForm) then
|
||||
Form.Caption := Value;
|
||||
end;
|
||||
end;
|
||||
|
||||
//=== { TJvColorCircleDialog } ===============================================
|
||||
|
||||
constructor TJvFullColorCircleDialog.Create(AOwner: TComponent);
|
||||
procedure InitAxe (Value: TJvAxisDelta);
|
||||
var
|
||||
Index: TJvAxisIndex;
|
||||
begin
|
||||
for Index := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
Value[Index].Value := 0;
|
||||
Value[Index].SaturationMethod := smLoop;
|
||||
end;
|
||||
end;
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FOptions := JvDefaultColorCircleDialogOptions;
|
||||
FDelta := TJvColorDelta.Create;
|
||||
FDropdownCount := 8;
|
||||
|
||||
InitAxe(FDelta.AxisRed);
|
||||
InitAxe(FDelta.AxisGreen);
|
||||
InitAxe(FDelta.AxisBlue);
|
||||
FDelta.ColorID := csRGB;
|
||||
end;
|
||||
|
||||
destructor TJvFullColorCircleDialog.Destroy;
|
||||
begin
|
||||
FDelta.Free;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function TJvFullColorCircleDialog.Execute: Boolean;
|
||||
begin
|
||||
FForm := TJvFullColorCircleFrm.Create(Application);
|
||||
with TJvFullColorCircleFrm(Form) do
|
||||
begin
|
||||
if Title <> '' then
|
||||
Caption := Title;
|
||||
DropdownCount := FDropdownCount;
|
||||
Options := Self.Options;
|
||||
Delta := Self.Delta;
|
||||
OnApply := @FormApply;
|
||||
OnClose := @FormClose;
|
||||
OnShow := @FormShow;
|
||||
HelpContext := Self.HelpContext;
|
||||
|
||||
Result := (ShowModal = mrOk);
|
||||
|
||||
Self.FDelta.AxisRed.Assign(RedDelta);
|
||||
Self.FDelta.AxisGreen.Assign(GreenDelta);
|
||||
Self.FDelta.AxisBlue.Assign(BlueDelta);
|
||||
Self.FDelta.ColorID := ColorID;
|
||||
end;
|
||||
FreeAndNil(FForm);
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.FormApply(Sender: TObject);
|
||||
begin
|
||||
if FForm<>nil then
|
||||
begin
|
||||
FDelta.ColorID := TJvFullColorCircleFrm(FForm).ColorID;
|
||||
FDelta.AxisRed := TJvFullColorCircleFrm(FForm).RedDelta;
|
||||
FDelta.AxisGreen := TJvFullColorCircleFrm(FForm).GreenDelta;
|
||||
FDelta.AxisBlue := TJvFullColorCircleFrm(FForm).BlueDelta;
|
||||
if Assigned(FOnApply) then
|
||||
FOnApply(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
var
|
||||
Allow: Boolean;
|
||||
begin
|
||||
if FForm<>nil then
|
||||
begin
|
||||
FDelta.ColorID := TJvFullColorCircleFrm(FForm).ColorID;
|
||||
FDelta.AxisRed := TJvFullColorCircleFrm(FForm).RedDelta;
|
||||
FDelta.AxisGreen := TJvFullColorCircleFrm(FForm).GreenDelta;
|
||||
FDelta.AxisBlue := TJvFullColorCircleFrm(FForm).BlueDelta;
|
||||
Allow := True;
|
||||
if Assigned(FOnCloseQuery) then
|
||||
FOnCloseQuery(Self, Allow);
|
||||
if Allow then
|
||||
Action := caFree
|
||||
else
|
||||
Action := caNone;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.FormShow(Sender: TObject);
|
||||
begin
|
||||
if FForm<>nil then
|
||||
begin
|
||||
FDelta.ColorID := TJvFullColorCircleFrm(FForm).ColorID;
|
||||
FDelta.AxisRed := TJvFullColorCircleFrm(FForm).RedDelta;
|
||||
FDelta.AxisGreen := TJvFullColorCircleFrm(FForm).GreenDelta;
|
||||
FDelta.AxisBlue := TJvFullColorCircleFrm(FForm).BlueDelta;
|
||||
if Assigned(FOnShow) then
|
||||
FOnShow(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TJvFullColorCircleDialog.GetBlueDelta: TJvAxisDelta;
|
||||
begin
|
||||
Result := FDelta.AxisBlue;
|
||||
end;
|
||||
|
||||
function TJvFullColorCircleDialog.GetColorID: TJvFullColorSpaceID;
|
||||
begin
|
||||
Result := FDelta.ColorID;
|
||||
end;
|
||||
|
||||
function TJvFullColorCircleDialog.GetGreenDelta: TJvAxisDelta;
|
||||
begin
|
||||
Result := FDelta.AxisGreen;
|
||||
end;
|
||||
|
||||
function TJvFullColorCircleDialog.GetRedDelta: TJvAxisDelta;
|
||||
begin
|
||||
Result := FDelta.AxisRed;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetBlueDelta(const Value: TJvAxisDelta);
|
||||
begin
|
||||
FDelta.AxisBlue.Assign(Value);
|
||||
if FForm <> nil then
|
||||
TJvFullColorCircleFrm(FForm).BlueDelta := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetColorID(
|
||||
const Value: TJvFullColorSpaceID);
|
||||
begin
|
||||
FDelta.ColorID := Value;
|
||||
if FForm <> nil then
|
||||
TJvFullColorCircleFrm(FForm).ColorID :=Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetGreenDelta(
|
||||
const Value: TJvAxisDelta);
|
||||
begin
|
||||
FDelta.AxisGreen.Assign(Value);
|
||||
if FForm <> nil then
|
||||
TJvFullColorCircleFrm(FForm).GreenDelta := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetHelpContext(const Value: THelpContext);
|
||||
begin
|
||||
FHelpContext := Value;
|
||||
if FForm <> nil then
|
||||
FForm.HelpContext := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetOptions(const Value: TJvFullColorCircleDialogOptions);
|
||||
begin
|
||||
FOptions := Value;
|
||||
if FForm <> nil then
|
||||
TJvFullColorCircleFrm(FForm).Options := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetRedDelta(const Value: TJvAxisDelta);
|
||||
begin
|
||||
FDelta.AxisRed.Assign(Value);
|
||||
if FForm <> nil then
|
||||
TJvFullColorCircleFrm(FForm).RedDelta := Value;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorCircleDialog.SetTitle(const Value: string);
|
||||
begin
|
||||
FTitle := Value;
|
||||
if FForm <> nil then
|
||||
FForm.Caption := Value;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
464
components/jvcllaz/run/JvMM/jvfullcolorform.lfm
Normal file
464
components/jvcllaz/run/JvMM/jvfullcolorform.lfm
Normal file
@ -0,0 +1,464 @@
|
||||
object JvFullColorFrm: TJvFullColorFrm
|
||||
Left = 373
|
||||
Height = 388
|
||||
Top = 274
|
||||
Width = 712
|
||||
ActiveControl = ColorBox
|
||||
AutoSize = True
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Color Spaces Editor, Choose your color'
|
||||
ClientHeight = 388
|
||||
ClientWidth = 712
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
LCLVersion = '2.1.0.0'
|
||||
object LabelColorSpace: TLabel
|
||||
AnchorSideLeft.Control = JvColorSpaceCombo
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 12
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 112
|
||||
BorderSpacing.Top = 8
|
||||
Caption = '&Current Color Space :'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelDrawOld: TLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = JvColorSpaceCombo
|
||||
AnchorSideRight.Control = LabelDrawNew
|
||||
AnchorSideBottom.Control = JvColorSpaceCombo
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 270
|
||||
Height = 23
|
||||
Top = 27
|
||||
Width = 61
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 16
|
||||
Color = clBlack
|
||||
ParentColor = False
|
||||
Transparent = False
|
||||
OnClick = LabelDrawOldClick
|
||||
end
|
||||
object LabelDrawNew: TLabel
|
||||
AnchorSideLeft.Control = LabelDrawOld
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelDrawOld
|
||||
AnchorSideRight.Control = GroupBoxSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = JvColorSpaceCombo
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 331
|
||||
Height = 23
|
||||
Top = 27
|
||||
Width = 61
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = False
|
||||
Color = clWhite
|
||||
ParentColor = False
|
||||
Transparent = False
|
||||
end
|
||||
object LabelOld: TLabel
|
||||
AnchorSideLeft.Control = LabelDrawOld
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
Left = 270
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 22
|
||||
Caption = 'Old:'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelNew: TLabel
|
||||
AnchorSideLeft.Control = LabelDrawNew
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
Left = 331
|
||||
Height = 15
|
||||
Top = 8
|
||||
Width = 27
|
||||
Caption = 'New:'
|
||||
ParentColor = False
|
||||
end
|
||||
object GroupBoxSettings: TGroupBox
|
||||
AnchorSideLeft.Control = JvColorSpaceCombo
|
||||
AnchorSideTop.Control = JvColorSpaceCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 246
|
||||
Top = 62
|
||||
Width = 380
|
||||
BorderSpacing.Top = 12
|
||||
BorderSpacing.Right = 16
|
||||
Caption = ' Settings ... '
|
||||
ClientHeight = 226
|
||||
ClientWidth = 376
|
||||
TabOrder = 1
|
||||
object LabelAxis0: TLabel
|
||||
AnchorSideLeft.Control = GroupBoxSettings
|
||||
AnchorSideTop.Control = GroupBoxSettings
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 4
|
||||
Width = 55
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 16
|
||||
BorderSpacing.Top = 4
|
||||
Caption = 'LabelAxis0'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelAxis1: TLabel
|
||||
AnchorSideLeft.Control = LabelAxis0
|
||||
AnchorSideTop.Control = ScrollBarAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 59
|
||||
Width = 55
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'LabelAxis1'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelAxis2: TLabel
|
||||
AnchorSideLeft.Control = LabelAxis0
|
||||
AnchorSideTop.Control = ScrollBarAxis1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 15
|
||||
Top = 114
|
||||
Width = 55
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Top = 16
|
||||
Caption = 'LabelAxis2'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelPredefined: TLabel
|
||||
AnchorSideLeft.Control = ColorBox
|
||||
AnchorSideTop.Control = ScrollBarAxis2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 88
|
||||
Height = 15
|
||||
Top = 169
|
||||
Width = 95
|
||||
Alignment = taRightJustify
|
||||
Caption = '&Predefined colors:'
|
||||
FocusControl = ColorBox
|
||||
ParentColor = False
|
||||
end
|
||||
object ScrollBarAxis0: TScrollBar
|
||||
AnchorSideLeft.Control = LabelAxis0
|
||||
AnchorSideTop.Control = LabelAxis0
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = SpinEditAxis0
|
||||
Left = 16
|
||||
Height = 20
|
||||
Top = 23
|
||||
Width = 268
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 16
|
||||
LargeChange = 16
|
||||
Max = 255
|
||||
PageSize = 0
|
||||
TabOrder = 0
|
||||
OnChange = ScrollBarChange
|
||||
end
|
||||
object ScrollBarAxis1: TScrollBar
|
||||
Tag = 1
|
||||
AnchorSideLeft.Control = LabelAxis1
|
||||
AnchorSideTop.Control = LabelAxis1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ScrollBarAxis0
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 20
|
||||
Top = 78
|
||||
Width = 268
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
LargeChange = 16
|
||||
Max = 255
|
||||
PageSize = 0
|
||||
TabOrder = 2
|
||||
OnChange = ScrollBarChange
|
||||
end
|
||||
object ScrollBarAxis2: TScrollBar
|
||||
Tag = 2
|
||||
AnchorSideLeft.Control = LabelAxis2
|
||||
AnchorSideTop.Control = LabelAxis2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ScrollBarAxis1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 16
|
||||
Height = 20
|
||||
Top = 133
|
||||
Width = 268
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 16
|
||||
LargeChange = 16
|
||||
Max = 255
|
||||
PageSize = 0
|
||||
TabOrder = 4
|
||||
OnChange = ScrollBarChange
|
||||
end
|
||||
object SpinEditAxis0: TSpinEdit
|
||||
AnchorSideTop.Control = ScrollBarAxis0
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = GroupBoxSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 300
|
||||
Height = 23
|
||||
Top = 22
|
||||
Width = 60
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 16
|
||||
MaxValue = 255
|
||||
OnChange = SpinEditChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object SpinEditAxis1: TSpinEdit
|
||||
Tag = 1
|
||||
AnchorSideLeft.Control = SpinEditAxis0
|
||||
AnchorSideTop.Control = ScrollBarAxis1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = SpinEditAxis0
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 300
|
||||
Height = 23
|
||||
Top = 77
|
||||
Width = 60
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
MaxValue = 255
|
||||
OnChange = SpinEditChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object SpinEditAxis2: TSpinEdit
|
||||
Tag = 2
|
||||
AnchorSideLeft.Control = SpinEditAxis1
|
||||
AnchorSideTop.Control = ScrollBarAxis2
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = SpinEditAxis0
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 300
|
||||
Height = 23
|
||||
Top = 132
|
||||
Width = 60
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
MaxValue = 255
|
||||
OnChange = SpinEditChange
|
||||
TabOrder = 5
|
||||
end
|
||||
object ColorBox: TColorBox
|
||||
AnchorSideLeft.Control = GroupBoxSettings
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = LabelPredefined
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 88
|
||||
Height = 22
|
||||
Top = 188
|
||||
Width = 201
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbPrettyNames]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 16
|
||||
ItemHeight = 16
|
||||
OnSelect = ComboBoxPredefinedSelect
|
||||
TabOrder = 6
|
||||
end
|
||||
end
|
||||
object JvFullColorGroup: TJvFullColorGroup
|
||||
AnchorSideLeft.Control = GroupBoxSettings
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonOK
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 408
|
||||
Height = 341
|
||||
Top = 8
|
||||
Width = 296
|
||||
ColCount = 8
|
||||
SquareSize = 30
|
||||
OnChange = JvFullColorGroupChange
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 8
|
||||
Constraints.MinWidth = 288
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
end
|
||||
object PanelGraphic: TPanel
|
||||
AnchorSideLeft.Control = GroupBoxSettings
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonOK
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 408
|
||||
Height = 341
|
||||
Top = 8
|
||||
Width = 296
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 8
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
ClientHeight = 341
|
||||
ClientWidth = 296
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object LabelAxis: TLabel
|
||||
AnchorSideLeft.Control = PanelGraphic
|
||||
AnchorSideTop.Control = JvColorAxisConfigCombo
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 10
|
||||
Height = 15
|
||||
Top = 14
|
||||
Width = 24
|
||||
BorderSpacing.Left = 8
|
||||
Caption = '&Axis:'
|
||||
ParentColor = False
|
||||
end
|
||||
object JvColorPanel: TJvFullColorPanel
|
||||
AnchorSideLeft.Control = PanelGraphic
|
||||
AnchorSideTop.Control = JvColorAxisConfigCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = PanelGraphic
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = JvFullColorTrackBar
|
||||
Left = 10
|
||||
Height = 263
|
||||
Top = 37
|
||||
Width = 268
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 8
|
||||
BorderSpacing.Bottom = 4
|
||||
FullColor = 83886079
|
||||
TabOrder = 1
|
||||
OnColorChange = JvColorPanelColorChange
|
||||
CrossSize = 10
|
||||
CrossCenter = 3
|
||||
CrossStyle.Width = 3
|
||||
ColorTrackBar = JvFullColorTrackBar
|
||||
end
|
||||
object JvFullColorTrackBar: TJvFullColorTrackBar
|
||||
AnchorSideLeft.Control = JvColorPanel
|
||||
AnchorSideRight.Control = JvColorPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = PanelGraphic
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 10
|
||||
Height = 27
|
||||
Top = 304
|
||||
Width = 268
|
||||
BorderSpacing.Bottom = 8
|
||||
FullColor = 83886079
|
||||
TabOrder = 2
|
||||
ArrowWidth = 8
|
||||
end
|
||||
object JvColorAxisConfigCombo: TJvFullColorAxisCombo
|
||||
AnchorSideLeft.Control = LabelAxis
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = PanelGraphic
|
||||
AnchorSideRight.Control = PanelGraphic
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 42
|
||||
Height = 23
|
||||
Top = 10
|
||||
Width = 244
|
||||
Selected = acXYZ
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
OnChange = ComboBoxAxisChange
|
||||
end
|
||||
end
|
||||
object ButtonGraphics: TButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
AnchorSideRight.Control = GroupBoxSettings
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 284
|
||||
Height = 25
|
||||
Top = 324
|
||||
Width = 108
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
Caption = 'ButtonGraphics'
|
||||
Constraints.MinWidth = 75
|
||||
OnClick = ButtonGraphicsClick
|
||||
TabOrder = 6
|
||||
end
|
||||
object ButtonOK: TButton
|
||||
AnchorSideLeft.Control = GroupBoxSettings
|
||||
AnchorSideTop.Control = GroupBoxSettings
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 25
|
||||
Top = 324
|
||||
Width = 75
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 16
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = '&OK'
|
||||
Constraints.MinWidth = 75
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 3
|
||||
end
|
||||
object ButtonCancel: TButton
|
||||
AnchorSideLeft.Control = ButtonOK
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
Left = 95
|
||||
Height = 25
|
||||
Top = 324
|
||||
Width = 75
|
||||
BorderSpacing.Left = 8
|
||||
Cancel = True
|
||||
Caption = 'Ca&ncel'
|
||||
ModalResult = 2
|
||||
TabOrder = 4
|
||||
end
|
||||
object ButtonApply: TButton
|
||||
AnchorSideLeft.Control = ButtonCancel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ButtonOK
|
||||
Left = 178
|
||||
Height = 25
|
||||
Top = 324
|
||||
Width = 75
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 8
|
||||
Caption = '&Apply'
|
||||
Constraints.MinWidth = 75
|
||||
OnClick = ButtonApplyClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object JvColorSpaceCombo: TJvFullColorSpaceCombo
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = LabelColorSpace
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 12
|
||||
Height = 23
|
||||
Top = 27
|
||||
Width = 244
|
||||
BorderSpacing.Left = 12
|
||||
BorderSpacing.Top = 4
|
||||
Constraints.MinWidth = 210
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
OnSelect = JvComboBoxColorSpaceSelect
|
||||
end
|
||||
end
|
506
components/jvcllaz/run/JvMM/jvfullcolorform.pas
Normal file
506
components/jvcllaz/run/JvMM/jvfullcolorform.pas
Normal file
@ -0,0 +1,506 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
||||
the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is: FullColorFrm.pas, released on 2004-09-11.
|
||||
|
||||
The Initial Developer of the Original Code is Florent Ouchet [ouchet dott florent att laposte dott net]
|
||||
Portions created by Florent Ouchet are Copyright (C) 2004 Florent Ouchet.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s): -
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvFullColorForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
//Windows, Messages,
|
||||
SysUtils, Classes, Controls, Forms, Graphics,
|
||||
Dialogs, StdCtrls, ExtCtrls, Spin, //Mask,
|
||||
ColorBox, // JvColorCombo
|
||||
JvFullColorCtrls, JvFullColorSpaces, JvFullColorDialogs;
|
||||
|
||||
//JvExMask,
|
||||
//JvSpin, JvExStdCtrls, JvCombobox, JvColorCombo, JvComponent;
|
||||
|
||||
type
|
||||
|
||||
{ TJvFullColorFrm }
|
||||
|
||||
TJvFullColorFrm = class(TForm) //TJvForm)
|
||||
LabelColorSpace: TLabel;
|
||||
GroupBoxSettings: TGroupBox;
|
||||
ScrollBarAxis0: TScrollBar;
|
||||
ScrollBarAxis1: TScrollBar;
|
||||
ScrollBarAxis2: TScrollBar;
|
||||
SpinEditAxis0: TSpinEdit; //TJvSpinEdit;
|
||||
SpinEditAxis1: TSpinEdit; //TJvSpinEdit;
|
||||
SpinEditAxis2: TSpinEdit; //TJvSpinEdit;
|
||||
LabelAxis0: TLabel;
|
||||
LabelAxis1: TLabel;
|
||||
LabelAxis2: TLabel;
|
||||
LabelPredefined: TLabel;
|
||||
PanelGraphic: TPanel;
|
||||
JvColorPanel: TJvFullColorPanel;
|
||||
JvFullColorTrackBar: TJvFullColorTrackBar;
|
||||
ButtonGraphics: TButton;
|
||||
ButtonOK: TButton;
|
||||
ButtonCancel: TButton;
|
||||
LabelDrawOld: TLabel;
|
||||
LabelDrawNew: TLabel;
|
||||
LabelOld: TLabel;
|
||||
LabelNew: TLabel;
|
||||
LabelAxis: TLabel;
|
||||
ButtonApply: TButton;
|
||||
JvColorAxisConfigCombo: TJvFullColorAxisCombo;
|
||||
JvColorSpaceCombo: TJvFullColorSpaceCombo;
|
||||
ColorBox: TColorBox; //TJvColorComboBox;
|
||||
JvFullColorGroup: TJvFullColorGroup;
|
||||
procedure ButtonApplyClick(Sender: TObject);
|
||||
procedure ButtonGraphicsClick(Sender: TObject);
|
||||
procedure ComboBoxAxisChange(Sender: TObject);
|
||||
procedure ComboBoxPredefinedSelect(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure JvColorPanelColorChange(Sender: TObject);
|
||||
procedure JvComboBoxColorSpaceSelect(Sender: TObject);
|
||||
procedure JvFullColorGroupChange(Sender: TObject);
|
||||
procedure LabelDrawOldClick(Sender: TObject);
|
||||
procedure ScrollBarChange(Sender: TObject);
|
||||
procedure SpinEditChange(Sender: TObject);
|
||||
private
|
||||
FUpdating: Boolean;
|
||||
FExpanded: Boolean;
|
||||
FExpandedWidth: Integer;
|
||||
FFullColor: TJvFullColor;
|
||||
FOptions: TJvFullColorDialogOptions;
|
||||
FOnApply: TNotifyEvent;
|
||||
FScrollBarAxes: array [TJvAxisIndex] of TScrollBar;
|
||||
FSpinEditAxes: array [TJvAxisIndex] of TSpinEdit; //TJvSpinEdit;
|
||||
FLabelAxes: array [TJvAxisIndex] of TLabel;
|
||||
FFilled: Boolean;
|
||||
procedure FillInternalArrays;
|
||||
function GetDropdownCount: Integer;
|
||||
procedure SetDropdownCount(AValue: Integer);
|
||||
protected
|
||||
procedure UpdateColorValue;
|
||||
procedure UpdateColorSpace;
|
||||
procedure SetFullColor(const Value: TJvFullColor);
|
||||
procedure SetOptions(const Value: TJvFullColorDialogOptions);
|
||||
procedure Loaded; override;
|
||||
property Expanded: Boolean read FExpanded;
|
||||
public
|
||||
constructor Create(AOwner: TComponent; AFullColor: TJvFullColor;
|
||||
AOptions: TJvFullColorDialogOptions); reintroduce;
|
||||
procedure Expand;
|
||||
procedure Collapse;
|
||||
property DropdownCount: Integer read GetDropDownCount write SetDropDownCount default 8;
|
||||
property Options: TJvFullColorDialogOptions read FOptions write SetOptions;
|
||||
property FullColor: TJvFullColor read FFullColor write SetFullColor;
|
||||
property OnApply: TNotifyEvent read FOnApply write FOnApply;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvResources;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
function AxisIndexFromTag(ATag: Integer): TJvAxisIndex;
|
||||
begin
|
||||
Result := TJvAxisIndex(ATag and $03);
|
||||
end;
|
||||
|
||||
constructor TJvFullColorFrm.Create(AOwner: TComponent;
|
||||
AFullColor: TJvFullColor; AOptions: TJvFullColorDialogOptions);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
FOptions := AOptions;
|
||||
FFullColor := AFullColor;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.FormCreate(Sender: TObject);
|
||||
var
|
||||
CS: TJvDEFColorSpace;
|
||||
Index:Integer;
|
||||
begin
|
||||
with ColorSpaceManager do
|
||||
begin
|
||||
CS := TJvDEFColorSpace(ColorSpace[csDEF]);
|
||||
for Index := 0 to CS.ColorCount - 1 do
|
||||
JvFullColorGroup.Items.Add(CS.ConvertFromColor(CS.ColorValue[Index]));
|
||||
LabelDrawOld.Color := ConvertToColor(FullColor);
|
||||
JvColorSpaceCombo.ColorSpaceID := GetColorSpaceID(FullColor);
|
||||
end;
|
||||
SetFullColor(FullColor);
|
||||
SetOptions(Options);
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Position := poScreenCenter;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
FExpandedWidth := Width;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.FillInternalArrays;
|
||||
begin
|
||||
if not FFilled then
|
||||
begin
|
||||
FScrollBarAxes[axIndex0] := ScrollBarAxis0;
|
||||
FScrollBarAxes[axIndex1] := ScrollBarAxis1;
|
||||
FScrollBarAxes[axIndex2] := ScrollBarAxis2;
|
||||
FSpinEditAxes[axIndex0] := SpinEditAxis0;
|
||||
FSpinEditAxes[axIndex1] := SpinEditAxis1;
|
||||
FSpinEditAxes[axIndex2] := SpinEditAxis2;
|
||||
FLabelAxes[axIndex0] := LabelAxis0;
|
||||
FLabelAxes[axIndex1] := LabelAxis1;
|
||||
FLabelAxes[axIndex2] := LabelAxis2;
|
||||
FFilled := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.ButtonGraphicsClick(Sender: TObject);
|
||||
begin
|
||||
if Expanded then
|
||||
Collapse
|
||||
else
|
||||
Expand;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.Collapse;
|
||||
begin
|
||||
Width := PanelGraphic.Left - 1;
|
||||
PanelGraphic.Visible := False;
|
||||
ButtonGraphics.Caption := RsCollapsedCaption;
|
||||
FExpanded := False;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.Expand;
|
||||
begin
|
||||
PanelGraphic.Visible := True;
|
||||
Width := FExpandedWidth;
|
||||
ButtonGraphics.Caption := RsExpandedCaption;
|
||||
FExpanded := True;
|
||||
end;
|
||||
|
||||
function TJvFullColorFrm.GetDropDownCount: Integer;
|
||||
begin
|
||||
Result := JvColorSpaceCombo.DropdownCount;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.SetDropdownCount(AValue: Integer);
|
||||
begin
|
||||
JvColorSpaceCombo.DropDownCount := AValue;
|
||||
JvColorAxisConfigCombo.DropDownCount := AValue;
|
||||
ColorBox.DropDownCount := AValue;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.SpinEditChange(Sender: TObject);
|
||||
var
|
||||
IntValue:Integer;
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FUpdating := True;
|
||||
|
||||
// with Sender as TJvSpinEdit do
|
||||
with Sender as TSpinEdit do
|
||||
if TryStrToInt(Text,IntValue) then
|
||||
FullColor := SetAxisValue(FullColor, AxisIndexFromTag(Tag), IntValue);
|
||||
|
||||
FUpdating := False;
|
||||
UpdateColorValue;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.ScrollBarChange(Sender: TObject);
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FUpdating := True;
|
||||
with Sender as TScrollBar do
|
||||
FullColor := SetAxisValue(FullColor, AxisIndexFromTag(Tag), Position);
|
||||
FUpdating := False;
|
||||
UpdateColorValue;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.JvColorPanelColorChange(Sender: TObject);
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FUpdating := True;
|
||||
FullColor := (Sender as TJvFullColorPanel).FullColor;
|
||||
FUpdating := False;
|
||||
UpdateColorValue;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.JvFullColorGroupChange(Sender: TObject);
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
|
||||
FUpdating := True;
|
||||
with (Sender as TJvFullColorGroup), ColorSpaceManager do
|
||||
if (SelectedIndex>-1) then
|
||||
begin
|
||||
JvColorSpaceCombo.ColorSpaceID := GetColorSpaceID(Selected);
|
||||
FullColor := Selected;
|
||||
end;
|
||||
FUpdating := False;
|
||||
|
||||
UpdateColorSpace;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.JvComboBoxColorSpaceSelect(Sender: TObject);
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FUpdating := True;
|
||||
with Sender as TJvFullColorSpaceCombo do
|
||||
FullColor := ColorSpaceManager.ConvertToID(FullColor, ColorSpaceID);
|
||||
FUpdating := False;
|
||||
UpdateColorSpace;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.ComboBoxPredefinedSelect(Sender: TObject);
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FUpdating := True;
|
||||
// with Sender as TJvColorComboBox, ColorSpaceManager do
|
||||
with Sender as TColorBox, ColorSpaceManager do
|
||||
FullColor := ConvertToID(ConvertFromColor(Colors[ItemIndex]),
|
||||
GetColorSpaceID(FullColor));
|
||||
FUpdating := False;
|
||||
UpdateColorSpace;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.ComboBoxAxisChange(Sender: TObject);
|
||||
begin
|
||||
JvColorPanel.AxisConfig := (Sender as TJvFullColorAxisCombo).Selected;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.UpdateColorValue;
|
||||
var
|
||||
I: TJvAxisIndex;
|
||||
C: TColor;
|
||||
NewIndex: Integer;
|
||||
ValueAxes: array [TJvAxisIndex] of Byte;
|
||||
J: Integer;
|
||||
LColorID: TJvFullColorSpaceID;
|
||||
DefColorSpace: TJvColorSpace;
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FillInternalArrays;
|
||||
|
||||
FUpdating := True;
|
||||
|
||||
LabelDrawNew.Color := ColorSpaceManager.ConvertToColor(FullColor);
|
||||
LabelDrawNew.Update;
|
||||
|
||||
LColorID := ColorSpaceManager.GetColorSpaceID(FullColor);
|
||||
|
||||
if (LColorID=csDEF) then
|
||||
begin
|
||||
JvFullColorGroup.Selected := FullColor;
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
FScrollBarAxes[I].Enabled := False;
|
||||
FScrollBarAxes[I].Position := 0;
|
||||
FSpinEditAxes[I].Enabled := False;
|
||||
FSpinEditAxes[I].Value := 0;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
JvColorPanel.FullColor := FullColor;
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
FScrollBarAxes[I].Enabled := True;
|
||||
FSpinEditAxes[I].Enabled := True;
|
||||
ValueAxes[I] := GetAxisValue(FullColor, I);
|
||||
FScrollBarAxes[I].Position := ValueAxes[I];
|
||||
FSpinEditAxes[I].Value := ValueAxes[I];
|
||||
end;
|
||||
end;
|
||||
|
||||
JvColorSpaceCombo.ColorSpaceID := LColorID;
|
||||
|
||||
NewIndex := -1;
|
||||
DefColorSpace := ColorSpaceManager.ColorSpace[csDEF];
|
||||
with ColorBox, Items, ColorSpaceManager do
|
||||
begin
|
||||
for J := 0 to Items.Count - 1 do
|
||||
begin
|
||||
C := DefColorSpace.ConvertFromColor(Colors[J]);
|
||||
if ConvertToID(C, LColorID) = FullColor then
|
||||
begin
|
||||
NewIndex := J;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
ItemIndex := NewIndex;
|
||||
end;
|
||||
|
||||
FUpdating := False;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.UpdateColorSpace;
|
||||
var
|
||||
I: TJvAxisIndex;
|
||||
AxisMin, AxisMax: Byte;
|
||||
lColorSpace: TJvColorSpace;
|
||||
begin
|
||||
if FUpdating then
|
||||
Exit;
|
||||
FillInternalArrays;
|
||||
FUpdating := True;
|
||||
LColorSpace := JvColorSpaceCombo.SelectedSpace;
|
||||
|
||||
AutoSize := false;
|
||||
if Assigned(LColorSpace) then
|
||||
begin
|
||||
if (LColorSpace.ID = csDEF) then
|
||||
begin
|
||||
PanelGraphic.Visible := False;
|
||||
JvFullColorGroup.Visible := Expanded;
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
FScrollBarAxes[I].Enabled := False;
|
||||
FScrollBarAxes[I].Position := 0;
|
||||
FSpinEditAxes[I].Enabled := False;
|
||||
FSpinEditAxes[I].Value := 0;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
PanelGraphic.Visible := Expanded;
|
||||
JvFullColorGroup.Visible := False;
|
||||
JvColorAxisConfigCombo.ColorID := LColorSpace.ID;
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
FLabelAxes[I].Caption := LColorSpace.AxisName[I];
|
||||
AxisMin := LColorSpace.AxisMin[I];
|
||||
AxisMax := LColorSpace.AxisMax[I];
|
||||
FScrollBarAxes[I].Min := AxisMin;
|
||||
FScrollBarAxes[I].Max := AxisMax;
|
||||
FSpinEditAxes[I].MinValue := AxisMin;
|
||||
FSpinEditAxes[I].MaxValue := AxisMax;
|
||||
end;
|
||||
|
||||
JvColorPanel.FullColor := FullColor;
|
||||
JvFullColorTrackBar.FullColor := FullColor;
|
||||
end;
|
||||
end;
|
||||
|
||||
FUpdating := False;
|
||||
UpdateColorValue;
|
||||
AutoSize := true;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.ButtonApplyClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(OnApply) then
|
||||
OnApply(Sender);
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.SetFullColor(const Value: TJvFullColor);
|
||||
begin
|
||||
FFullColor := Value;
|
||||
if not FUpdating then
|
||||
begin
|
||||
with ColorSpaceManager do
|
||||
JvColorSpaceCombo.ColorSpaceID := GetColorSpaceID(Value);
|
||||
UpdateColorSpace;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.SetOptions(const Value: TJvFullColorDialogOptions);
|
||||
var
|
||||
LVisible: Boolean;
|
||||
LColor: TColor;
|
||||
begin
|
||||
FOptions := Value;
|
||||
|
||||
if foFullOpen in Options then
|
||||
Expand
|
||||
else
|
||||
Collapse;
|
||||
|
||||
ButtonGraphics.Enabled := not (foPreventExpand in Options);
|
||||
|
||||
ButtonApply.Visible := (foShowApply in Options);
|
||||
|
||||
if foShowHelp in Options then
|
||||
BorderIcons := BorderIcons + [biHelp]
|
||||
else
|
||||
BorderIcons := BorderIcons - [biHelp];
|
||||
|
||||
JvColorSpaceCombo.Enabled := foAllowSpaceChange in Options;
|
||||
|
||||
LVisible := foShowOldPreview in Options;
|
||||
LabelDrawOld.Visible := LVisible;
|
||||
LabelOld.Visible := LVisible;
|
||||
|
||||
LVisible := foShowNewPreview in Options;
|
||||
LabelDrawNew.Visible := LVisible;
|
||||
LabelNew.Visible := LVisible;
|
||||
|
||||
LVisible := foShowPredefined in Options;
|
||||
ColorBox.Visible := LVisible;
|
||||
LabelPredefined.Visible := LVisible;
|
||||
|
||||
JvColorSpaceCombo.AllowVariable := foAllowVariable in Options;
|
||||
if foAllowVariable in Options then
|
||||
// ColorBox.Options := ColorBox.Options + [coSysColors]
|
||||
ColorBox.Style := ColorBox.style + [cbSystemColors]
|
||||
else
|
||||
// ColorBox.Options := ColorBox.Options - [coSysColors];
|
||||
ColorBox.Style := ColorBox.Style - [cbSystemColors];
|
||||
|
||||
{ if foNoneAndDefault in Options then
|
||||
ColorBox.Style := ColorBox.Style + [cbIncludeNone, cbIncludeDefault]
|
||||
else
|
||||
ColorBox.Style := ColorBox.Style - [cbIncludeNone, cbIncludeDefault];}
|
||||
|
||||
UpdateColorSpace;
|
||||
|
||||
LColor := ColorSpaceManager.ConvertToColor(FullColor);
|
||||
|
||||
LabelDrawNew.Color := LColor;
|
||||
LabelDrawOld.Color := LColor;
|
||||
end;
|
||||
|
||||
procedure TJvFullColorFrm.LabelDrawOldClick(Sender: TObject);
|
||||
begin
|
||||
with ColorSpaceManager do
|
||||
FullColor := ConvertToID(
|
||||
ConvertFromColor(LabelDrawOld.Color),
|
||||
GetColorSpaceID(FullColor)
|
||||
);
|
||||
end;
|
||||
|
||||
end.
|
385
components/jvcllaz/run/JvMM/jvfullcolorrotate.pas
Normal file
385
components/jvcllaz/run/JvMM/jvfullcolorrotate.pas
Normal file
@ -0,0 +1,385 @@
|
||||
{-----------------------------------------------------------------------------
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
||||
the specific language governing rights and limitations under the License.
|
||||
|
||||
The Original Code is: ColorRotate.pas, released on 2004-09-11.
|
||||
|
||||
The Initial Developer of the Original Code is Florent Ouchet [ouchet dott florent att laposte dott net]
|
||||
Portions created by Florent Ouchet are Copyright (C) 2004 Florent Ouchet.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s): -
|
||||
|
||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
||||
located at http://jvcl.delphi-jedi.org
|
||||
|
||||
Known Issues:
|
||||
-----------------------------------------------------------------------------}
|
||||
// $Id$
|
||||
|
||||
unit JvFullColorRotate;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
//Windows,
|
||||
Classes, Graphics,
|
||||
JvFullColorSpaces;
|
||||
|
||||
type
|
||||
TJvRotateColor = (rcCommon, rcRed, rcGreen, rcBlue);
|
||||
|
||||
TJvSaturationMethod = (smRange, smLoop);
|
||||
|
||||
TJvRotateValueType = -255..255;
|
||||
|
||||
TJvRotateValue = class(TPersistent)
|
||||
private
|
||||
FValue: TJvRotateValueType;
|
||||
FSaturationMethod: TJvSaturationMethod;
|
||||
public
|
||||
constructor Create; reintroduce;
|
||||
property Value: TJvRotateValueType read FValue write FValue default 0;
|
||||
property SaturationMethod: TJvSaturationMethod read FSaturationMethod write FSaturationMethod default smRange;
|
||||
procedure Assign(AValue: TJvRotateValue); reintroduce;
|
||||
end;
|
||||
|
||||
TJvAxisDelta = class(TPersistent)
|
||||
private
|
||||
FConstituents: array [TJvAxisIndex] of TJvRotateValue;
|
||||
function GetConstituents(Index: TJvAxisIndex): TJvRotateValue;
|
||||
procedure SetConstituents(Index: TJvAxisIndex; const Value: TJvRotateValue);
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure Assign(Value: TJvAxisDelta); reintroduce;
|
||||
property Constituents[Index: TJvAxisIndex]: TJvRotateValue read GetConstituents write SetConstituents; default;
|
||||
end;
|
||||
|
||||
TJvColorDelta = class(TPersistent)
|
||||
private
|
||||
FColorID: TJvFullColorSpaceID;
|
||||
FAxisRed: TJvAxisDelta;
|
||||
FAxisGreen: TJvAxisDelta;
|
||||
FAxisBlue: TJvAxisDelta;
|
||||
procedure SetAxisBlue(const Value: TJvAxisDelta);
|
||||
procedure SetAxisGreen(const Value: TJvAxisDelta);
|
||||
procedure SetAxisRed(const Value: TJvAxisDelta);
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
procedure Assign(Value: TJvColorDelta); reintroduce;
|
||||
property ColorID: TJvFullColorSpaceID read FColorID write FColorID default csRGB;
|
||||
property AxisRed: TJvAxisDelta read FAxisRed write SetAxisRed;
|
||||
property AxisGreen: TJvAxisDelta read FAxisGreen write SetAxisGreen;
|
||||
property AxisBlue: TJvAxisDelta read FAxisBlue write SetAxisBlue;
|
||||
end;
|
||||
|
||||
function RotateColor(AColor: TJvFullColor; AColorDelta: TJvColorDelta): TJvFullColor;
|
||||
procedure RotateBitmap(SourceBitmap, DestBitmap: TBitmap; AColorDelta: TJvColorDelta);
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
JvTypes;
|
||||
|
||||
function RotateColor(AColor: TJvFullColor; AColorDelta: TJvColorDelta): TJvFullColor;
|
||||
var
|
||||
I: TJvAxisIndex;
|
||||
MinAxis: array [TJvAxisIndex] of Byte;
|
||||
MaxAxis: array [TJvAxisIndex] of Byte;
|
||||
ValueAxis: array [TJvAxisIndex] of SmallInt;
|
||||
ColorRed, ColorGreen, ColorBlue: TColor;
|
||||
MaxColorAxis:Integer;
|
||||
SourceColorSpace, DeltaColorSpace: TJvColorSpace;
|
||||
LColor: TColor;
|
||||
|
||||
function DoRotate(AValue: TJvFullColor; AAxisDelta: TJvAxisDelta): TColor;
|
||||
var
|
||||
I: TJvAxisIndex;
|
||||
Range: Integer;
|
||||
begin
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
ValueAxis[I] := Integer(GetAxisValue(AValue, I)) + AAxisDelta[I].Value;
|
||||
if AAxisDelta[I].SaturationMethod = smRange then
|
||||
begin
|
||||
if ValueAxis[I] > MaxAxis[I] then
|
||||
ValueAxis[I] := MaxAxis[I];
|
||||
if ValueAxis[I] < MinAxis[I] then
|
||||
ValueAxis[I] := MinAxis[I];
|
||||
end
|
||||
else
|
||||
begin
|
||||
Range := MaxAxis[I] - MinAxis[I] + 1;
|
||||
while ValueAxis[I] < MinAxis[I] do
|
||||
Inc(ValueAxis[I], Range);
|
||||
while ValueAxis[I] > MaxAxis[I] do
|
||||
Dec(ValueAxis[I], Range);
|
||||
end;
|
||||
end;
|
||||
Result :=
|
||||
(ValueAxis[axIndex0]) or (ValueAxis[axIndex1] shl 8) or (ValueAxis[axIndex2] shl 16);
|
||||
end;
|
||||
|
||||
begin
|
||||
with ColorSpaceManager do
|
||||
begin
|
||||
SourceColorSpace := ColorSpace[GetColorSpaceID(AColor)];
|
||||
LColor := SourceColorSpace.ConvertToColor(AColor);
|
||||
DeltaColorSpace := ColorSpace[AColorDelta.ColorID];
|
||||
|
||||
with DeltaColorSpace do
|
||||
begin
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
MinAxis[I] := AxisMin[I];
|
||||
MaxAxis[I] := AxisMax[I];
|
||||
end;
|
||||
ColorRed := ConvertToColor(DoRotate(ConvertFromColor(LColor and $000000FF), AColorDelta.AxisRed));
|
||||
ColorGreen := ConvertToColor(DoRotate(ConvertFromColor(LColor and $0000FF00), AColorDelta.AxisGreen));
|
||||
ColorBlue := ConvertToColor(DoRotate(ConvertFromColor(LColor and $00FF0000), AColorDelta.AxisBlue));
|
||||
|
||||
MaxColorAxis := 255;
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
ValueAxis[I] := (ColorRed and $FF) + (ColorGreen and $FF) + (ColorBlue and $FF);
|
||||
if ValueAxis[I] > MaxColorAxis then
|
||||
MaxColorAxis := ValueAxis[I];
|
||||
ColorRed := ColorRed shr 8;
|
||||
ColorGreen := ColorGreen shr 8;
|
||||
ColorBlue := ColorBlue shr 8;
|
||||
end;
|
||||
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
ValueAxis[I] := ValueAxis[I] + 255 - MaxColorAxis;
|
||||
if ValueAxis[I] < 0 then
|
||||
ValueAxis[I] := 0;
|
||||
end;
|
||||
LColor := ValueAxis[axIndex0] or (ValueAxis[axIndex1] shl 8) or (ValueAxis[axIndex2] shl 16);
|
||||
end;
|
||||
Result := SourceColorSpace.ConvertFromColor(LColor);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RotateBitmap(SourceBitmap, DestBitmap: TBitmap; AColorDelta: TJvColorDelta);
|
||||
type
|
||||
TFullColorValue = array [TJvAxisIndex] of SmallInt;
|
||||
PFullColorValue = ^TFullColorValue;
|
||||
var
|
||||
OriginalPixelFormat: TPixelFormat;
|
||||
Colors: array [TJvAxisIndex,Byte] of TFullColorValue;
|
||||
ColorR, ColorB, ColorG, ColorFusion: TFullColorValue;
|
||||
I: TJvAxisIndex;
|
||||
J: Byte;
|
||||
X, Y: Integer;
|
||||
MinAxis: array [TJvAxisIndex] of SmallInt;
|
||||
MaxAxis: array [TJvAxisIndex] of SmallInt;
|
||||
MaxColorAxis: SmallInt;
|
||||
DeltaColorSpace: TJvColorSpace;
|
||||
DestLine, SourceLine: PCardinal;
|
||||
|
||||
procedure DoRotate(Color: TColor; AAxisDelta: TJvAxisDelta; out DestColor: TFullColorValue);
|
||||
var
|
||||
I: TJvAxisIndex;
|
||||
Range: Integer;
|
||||
FullColor: TJvFullColor;
|
||||
ColorValue: TFullColorValue;
|
||||
begin
|
||||
FullColor := DeltaColorSpace.ConvertFromColor(Color);
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
ColorValue[I] := Integer(GetAxisValue(FullColor, I)) + AAxisDelta[I].Value;
|
||||
if AAxisDelta[I].SaturationMethod = smRange then
|
||||
begin
|
||||
if ColorValue[I] > MaxAxis[I] then
|
||||
ColorValue[I] := MaxAxis[I];
|
||||
if ColorValue[I] < MinAxis[I] then
|
||||
ColorValue[I] := MinAxis[I];
|
||||
end
|
||||
else
|
||||
begin
|
||||
Range := MaxAxis[I] - MinAxis[I] + 1;
|
||||
while ColorValue[I] < MinAxis[I] do
|
||||
Inc(ColorValue[I], Range);
|
||||
while ColorValue[I] > MaxAxis[I] do
|
||||
Dec(ColorValue[I], Range);
|
||||
end;
|
||||
end;
|
||||
Color := DeltaColorSpace.ConvertToColor(ColorValue[axIndex0] or
|
||||
(ColorValue[axIndex1] shl 8) or (ColorValue[axIndex2] shl 16));
|
||||
DestColor[axIndex0] := Color and $FF;
|
||||
DestColor[axIndex1] := (Color shr 8) and $FF;
|
||||
DestColor[axIndex2] := (Color shr 16) and $FF;
|
||||
end;
|
||||
|
||||
begin
|
||||
DestBitmap.Width := SourceBitmap.Width;
|
||||
DestBitmap.Height := SourceBitmap.Height;
|
||||
OriginalPixelFormat := SourceBitmap.PixelFormat;
|
||||
SourceBitmap.PixelFormat := pf32bit;
|
||||
DestBitmap.PixelFormat := pf32bit;
|
||||
with ColorSpaceManager do
|
||||
begin
|
||||
DeltaColorSpace := ColorSpace[AColorDelta.ColorID];
|
||||
with DeltaColorSpace do
|
||||
begin
|
||||
for I := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
begin
|
||||
MinAxis[I] := AxisMin[I];
|
||||
MaxAxis[I] := AxisMax[I];
|
||||
end;
|
||||
for J := Low(Byte) to High(Byte) do
|
||||
begin
|
||||
DoRotate(TColor(J),AColorDelta.AxisRed,Colors[axIndex0,J]);
|
||||
DoRotate(TColor(J shl 8),AColorDelta.AxisGreen,Colors[axIndex1,J]);
|
||||
DoRotate(TColor(J shl 16),AColorDelta.AxisBlue,Colors[axIndex2,J]);
|
||||
end;
|
||||
|
||||
for Y := 0 to DestBitmap.Height-1 do
|
||||
begin
|
||||
SourceLine := SourceBitmap.ScanLine[Y];
|
||||
DestLine := DestBitmap.ScanLine[Y];
|
||||
for X := 0 to DestBitmap.Width-1 do
|
||||
begin
|
||||
ColorR := Colors[axIndex0,(SourceLine^ shr 16) and $FF]; //
|
||||
ColorG := Colors[axIndex1,(SourceLine^ shr 8) and $FF]; // Bitmap Color Format is
|
||||
ColorB := Colors[axIndex2,(SourceLine^) and $FF]; // (MSB)0RGB(LSB)
|
||||
ColorFusion[axIndex0] := ColorR[axIndex0] + ColorG[axIndex0] + ColorB[axIndex0];
|
||||
ColorFusion[axIndex1] := ColorR[axIndex1] + ColorG[axIndex1] + ColorB[axIndex1];
|
||||
ColorFusion[axIndex2] := ColorR[axIndex2] + ColorG[axIndex2] + ColorB[axIndex2];
|
||||
MaxColorAxis := 255;
|
||||
if ColorFusion[axIndex0] > MaxColorAxis then
|
||||
MaxColorAxis := ColorFusion[axIndex0];
|
||||
if ColorFusion[axIndex1] > MaxColorAxis then
|
||||
MaxColorAxis := ColorFusion[axIndex1];
|
||||
if ColorFusion[axIndex2] > MaxColorAxis then
|
||||
MaxColorAxis := ColorFusion[axIndex2];
|
||||
ColorFusion[axIndex0] := ColorFusion[axIndex0] + 255 - MaxColorAxis;
|
||||
if ColorFusion[axIndex0] < 0 then
|
||||
ColorFusion[axIndex0] := 0;
|
||||
ColorFusion[axIndex1] := ColorFusion[axIndex1] + 255 - MaxColorAxis;
|
||||
if ColorFusion[axIndex1] < 0 then
|
||||
ColorFusion[axIndex1] := 0;
|
||||
ColorFusion[axIndex2] := ColorFusion[axIndex2] + 255 - MaxColorAxis;
|
||||
if ColorFusion[axIndex2] < 0 then
|
||||
ColorFusion[axIndex2] := 0;
|
||||
DestLine^ := // Bitmap Color Format is (MSB)0RGB(LSB)
|
||||
(ColorFusion[axIndex0] shl 16) or (ColorFusion[axIndex1] shl 8) or (ColorFusion[axIndex2]);
|
||||
Inc(SourceLine);
|
||||
Inc(DestLine);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
SourceBitmap.PixelFormat := OriginalPixelFormat;
|
||||
DestBitmap.PixelFormat := OriginalPixelFormat;
|
||||
end;
|
||||
|
||||
//=== { TJvAxisDelta } =======================================================
|
||||
|
||||
constructor TJvAxisDelta.Create;
|
||||
var
|
||||
Index: TJvAxisIndex;
|
||||
begin
|
||||
inherited Create;
|
||||
for Index := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
FConstituents[Index] := TJvRotateValue.Create;
|
||||
end;
|
||||
|
||||
destructor TJvAxisDelta.Destroy;
|
||||
var
|
||||
Index: TJvAxisIndex;
|
||||
begin
|
||||
for Index := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
FConstituents[Index].Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TJvAxisDelta.Assign(Value: TJvAxisDelta);
|
||||
var
|
||||
Index: TJvAxisIndex;
|
||||
begin
|
||||
for Index := Low(TJvAxisIndex) to High(TJvAxisIndex) do
|
||||
FConstituents[Index].Assign(Value[Index]);
|
||||
end;
|
||||
|
||||
function TJvAxisDelta.GetConstituents(Index: TJvAxisIndex): TJvRotateValue;
|
||||
begin
|
||||
Result := FConstituents[Index];
|
||||
end;
|
||||
|
||||
procedure TJvAxisDelta.SetConstituents(Index: TJvAxisIndex;
|
||||
const Value: TJvRotateValue);
|
||||
begin
|
||||
FConstituents[Index].Assign(Value);
|
||||
end;
|
||||
|
||||
//=== { TJvColorDelta } ======================================================
|
||||
|
||||
constructor TJvColorDelta.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
FColorID := csRGB;
|
||||
FAxisRed := TJvAxisDelta.Create;
|
||||
FAxisGreen := TJvAxisDelta.Create;
|
||||
FAxisBlue := TJvAxisDelta.Create;
|
||||
end;
|
||||
|
||||
destructor TJvColorDelta.Destroy;
|
||||
begin
|
||||
FAxisRed.Free;
|
||||
FAxisGreen.Free;
|
||||
FAxisBlue.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TJvColorDelta.Assign(Value: TJvColorDelta);
|
||||
begin
|
||||
AxisRed.Assign(Value.AxisRed);
|
||||
AxisGreen.Assign(Value.AxisGreen);
|
||||
AxisBlue.Assign(Value.AxisBlue);
|
||||
ColorID := Value.ColorID;
|
||||
end;
|
||||
|
||||
procedure TJvColorDelta.SetAxisBlue(const Value: TJvAxisDelta);
|
||||
begin
|
||||
FAxisBlue.Assign(Value);
|
||||
end;
|
||||
|
||||
procedure TJvColorDelta.SetAxisGreen(const Value: TJvAxisDelta);
|
||||
begin
|
||||
FAxisGreen.Assign(Value);
|
||||
end;
|
||||
|
||||
procedure TJvColorDelta.SetAxisRed(const Value: TJvAxisDelta);
|
||||
begin
|
||||
FAxisRed.Assign(Value);
|
||||
end;
|
||||
|
||||
//=== { TJvRotateValue } =====================================================
|
||||
|
||||
constructor TJvRotateValue.Create;
|
||||
begin
|
||||
FValue := 0;
|
||||
FSaturationMethod := smLoop;
|
||||
end;
|
||||
|
||||
procedure TJvRotateValue.Assign(AValue: TJvRotateValue);
|
||||
begin
|
||||
FValue := AValue.Value;
|
||||
FSaturationMethod := AValue.SaturationMethod;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
1651
components/jvcllaz/run/JvMM/jvfullcolorspaces.pas
Normal file
1651
components/jvcllaz/run/JvMM/jvfullcolorspaces.pas
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user