modifié : src/GraphicObjects/HueSelector.cs
modifié : src/GraphicObjects/SaturationValueSelector.cs
ctx.Stroke();
ctx.Restore ();
}
+ public override void OnLayoutChanges (LayoutingType layoutType)
+ {
+ base.OnLayoutChanges (layoutType);
+
+ if (Orientation == Orientation.Horizontal) {
+ if (layoutType == LayoutingType.Width)
+ updateMousePosFromHue ();
+ } else if (layoutType == LayoutingType.Height)
+ updateMousePosFromHue ();
+ }
protected override void updateMouseLocalPos (Point mPos)
{
base.updateMouseLocalPos (mPos);
NotifyValueChanged ("S", s);
NotifyValueChanged ("V", v);
}
+ public override void OnLayoutChanges (LayoutingType layoutType)
+ {
+ base.OnLayoutChanges (layoutType);
+ switch (layoutType) {
+ case LayoutingType.Width:
+ mousePos.X = (int)Math.Floor(s * (double)ClientRectangle.Width);
+ break;
+ case LayoutingType.Height:
+ mousePos.Y = (int)Math.Floor((1.0-v) * (double)ClientRectangle.Height);
+ break;
+ }
+ }
}
}