本文整理汇总了C#中ColorGradient类的典型用法代码示例。如果您正苦于以下问题:C# ColorGradient类的具体用法?C# ColorGradient怎么用?C# ColorGradient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ColorGradient类属于命名空间,在下文中一共展示了ColorGradient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VerticalMeterData
public VerticalMeterData()
{
Inverted = false;
DecayTime = 1500;
AttackTime = 50;
Normalize = true;
Gain = 0;
Range = 10;
RedColorPosition = 95;
GreenColorPosition = 25;
MeterColorStyle = MeterColorTypes.Linear;
LowPass = false;
LowPassFreq = 100;
HighPass = false;
HighPassFreq = 500;
Color[] myColors = { Color.Lime, Color.Yellow, Color.Red };
float[] myPositions = { 0, (float)GreenColorPosition / 100, (float)RedColorPosition / 100 };
ColorBlend linearBlend = new ColorBlend();
linearBlend.Colors = myColors;
linearBlend.Positions = myPositions;
ColorGradient linearGradient = new ColorGradient(linearBlend);
IntensityCurve = new Curve();
IntensityCurve.Points.Clear();
IntensityCurve.Points.Add(new ZedGraph.PointPair(0, 100));
IntensityCurve.Points.Add(new ZedGraph.PointPair(100, 100));
MeterColorGradient = linearGradient;
DepthOfEffect = 0;
}
示例2: VUMeterData
public VUMeterData()
{
DecayTime = 1500;
AttackTime = 50;
Normalize = true;
Gain = 0;
Range = 10;
RedColorPosition = 95;
GreenColorPosition = 25;
MeterColorStyle = MeterColorTypes.Custom;
LowPass = false;
LowPassFreq = 100;
HighPass = false;
HighPassFreq = 500;
IntensityCurve = new Curve();
IntensityCurve.Points.Clear();
IntensityCurve.Points.Add(new ZedGraph.PointPair(0, 0));
IntensityCurve.Points.Add(new ZedGraph.PointPair(100, 100));
ColorGradient linearGradient = new ColorGradient(Color.White);
MeterColorGradient = linearGradient;
DepthOfEffect = 0;
}
示例3: RenderNode
// renders the given node to the internal ElementData dictionary. If the given node is
// not a element, will recursively descend until we render its elements.
public static EffectIntents RenderNode(ElementNode node, Curve levelCurve, ColorGradient colorGradient, TimeSpan duration, bool isDiscrete, bool allowZeroIntensity = false)
{
//Collect all the points first.
double[] allPointsTimeOrdered = _GetAllSignificantDataPoints(levelCurve, colorGradient).ToArray();
var elementData = new EffectIntents();
foreach (ElementNode elementNode in node.GetLeafEnumerator())
{
// this is probably always going to be a single element for the given node, as
// we have iterated down to leaf nodes in RenderNode() above. May as well do
// it this way, though, in case something changes in future.
if (elementNode == null || elementNode.Element == null)
continue;
//ElementColorType colorType = ColorModule.getColorTypeForElementNode(elementNode);
if (isDiscrete && IsElementDiscrete(node))
{
IEnumerable<Color> colors = ColorModule.getValidColorsForElementNode(elementNode, false)
.Intersect(colorGradient.GetColorsInGradient());
foreach (Color color in colors)
{
AddIntentsToElement(elementNode.Element, allPointsTimeOrdered, levelCurve, colorGradient, duration, elementData, allowZeroIntensity, color);
}
}
else
{
AddIntentsToElement(elementNode.Element, allPointsTimeOrdered, levelCurve, colorGradient, duration, elementData, allowZeroIntensity);
}
}
return elementData;
}
示例4: ChaseData
public ChaseData()
{
ColorHandling = ChaseColorHandling.StaticColor;
PulseOverlap = 0;
DefaultLevel = 0;
StaticColor = Color.White;
ColorGradient = new ColorGradient();
PulseCurve = new Curve();
ChaseMovement = new Curve();
}
示例5: GumpGradient
public GumpGradient(int x, int y, int width, int height, Direction45 dirTo, ColorGradient gradient)
{
_X = x;
_Y = y;
_Width = width;
_Height = height;
_Direction = dirTo;
_Gradient = gradient;
}
示例6: ColorGradientEditor
public ColorGradientEditor(ColorGradient gradient, bool discreteColors, IEnumerable<Color> validDiscreteColors)
{
InitializeComponent();
Icon = Common.Resources.Properties.Resources.Icon_Vixen3;
gradientEditPanel.GradientChanged += GradientChangedHandler;
Gradient = gradient;
_discreteColors = discreteColors;
_validDiscreteColors = validDiscreteColors;
PopulateFormWithGradient(_gradient);
}
示例7: CurtainData
public CurtainData()
{
Gradient = new ColorGradient();
Gradient.Colors.Clear();
Gradient.Colors.Add(new ColorPoint(Color.Red, 0.0));
Gradient.Colors.Add(new ColorPoint(Color.Lime, 1.0));
Direction = CurtainDirection.CurtainOpen;
Speed = 1;
Edge = CurtainEdge.Center;
Swag = 1;
LevelCurve = new Curve(CurveType.Flat100);
Orientation=StringOrientation.Vertical;
}
示例8: ChaseData
public ChaseData()
{
ColorHandling = ChaseColorHandling.StaticColor;
PulseOverlap = 0;
DefaultLevel = 0;
StaticColor = Color.White;
ColorGradient = new ColorGradient(Color.White);
PulseCurve = new Curve();
ChaseMovement = new Curve();
DepthOfEffect = 0;
ExtendPulseToStart = false;
ExtendPulseToEnd = false;
}
示例9: ColorWashData
public ColorWashData()
{
Gradient = new ColorGradient();
Gradient.Colors.Clear();
Gradient.Colors.Add(new ColorPoint(Color.Red, 0.0));
Gradient.Colors.Add(new ColorPoint(Color.Lime, .5));
Gradient.Colors.Add(new ColorPoint(Color.Blue, 1.0));
Type = ColorWashType.Center;
Iterations = 1;
VerticalFade = false;
HorizontalFade = false;
LevelCurve = new Curve(new PointPairList(new[] { 0.0, 100.0 }, new[] { 100.0, 100.0 }));
Orientation=StringOrientation.Vertical;
}
示例10: TwinkleData
public TwinkleData()
{
IndividualChannels = true;
MinimumLevel = 0;
MaximumLevel = 100;
LevelVariation = 50;
AveragePulseTime = 400;
PulseTimeVariation = 30;
AverageCoverage = 50;
ColorHandling = TwinkleColorHandling.GradientForEachPulse;
StaticColor = Color.Empty;
ColorGradient = new ColorGradient(Color.White);
DepthOfEffect = 0;
}
示例11: ColorGradientEditor
public ColorGradientEditor(ColorGradient gradient, bool discreteColors, IEnumerable<Color> validDiscreteColors)
{
InitializeComponent();
ForeColor = ThemeColorTable.ForeColor;
BackColor = ThemeColorTable.BackgroundColor;
ThemeUpdateControls.UpdateControls(this);
Icon = Resources.Icon_Vixen3;
gradientEditPanel.GradientChanged += GradientChangedHandler;
Gradient = gradient;
_discreteColors = discreteColors;
_validDiscreteColors = validDiscreteColors;
PopulateFormWithGradient(_gradient);
}
示例12: WipeData
public WipeData() {
Curve = new Curve();
Curve.Points.Clear();
Curve.Points.Add(0, 0);
Curve.Points.Add(50, 100);
Curve.Points.Add(100, 0);
Direction = WipeDirection.Right;
ColorGradient = new ColorGradient(Color.White);
PulseTime = 1000;
WipeByCount = false;
PassCount = 1;
PulsePercent = 33;
}
示例13: TreeData
public TreeData()
{
Colors = new List<ColorGradient>{new ColorGradient(Color.Red), new ColorGradient(Color.Lime), new ColorGradient(Color.Blue)};
BackgroundColor = new ColorGradient(Color.Red);
ColorType = TreeColorType.Static;
BranchDirection = TreeBranchDirection.Up;
Speed = 10;
ToggleBlend = true;
Branches = 10;
LevelCurve = new Curve(new PointPairList(new[] { 0.0, 100.0 }, new[] { 100.0, 100.0 }));
BlendCurve = new Curve(new PointPairList(new[] { 0.0, 100.0 }, new[] { 70.0, 70.0 }));
BackgroundLevelCurve = new Curve(new PointPairList(new[] { 0.0, 100.0 }, new[] { 70.0, 70.0 }));
Orientation=StringOrientation.Vertical;
}
示例14: ButterflyData
public ButterflyData()
{
Gradient = new ColorGradient();
Gradient.Colors.Clear();
Gradient.Colors.Add(new ColorPoint(Color.Red,0.0));
Gradient.Colors.Add(new ColorPoint(Color.Lime, 1.0));
Iterations = 1;
ColorScheme = ColorScheme.Gradient;
ButterflyType = ButterflyType.Type1;
Repeat = 1;
BackgroundSkips = 2;
BackgroundChunks = 1;
Direction = Direction.Forward;
LevelCurve = new Curve(new PointPairList(new[] { 0.0, 100.0 }, new[] { 100.0, 100.0 }));
Orientation=StringOrientation.Vertical;
}
示例15: SpinData
public SpinData()
{
SpeedFormat = SpinSpeedFormat.RevolutionCount;
PulseLengthFormat = SpinPulseLengthFormat.EvenlyDistributedAcrossSegments;
ColorHandling = SpinColorHandling.StaticColor;
RevolutionCount = 3;
RevolutionFrequency = 2;
RevolutionTime = 500;
PulseTime = 100;
PulsePercentage = 10;
DefaultLevel = 0;
StaticColor = Color.White;
ColorGradient = new ColorGradient();
PulseCurve = new Curve();
ReverseSpin = false;
}