本文整理汇总了C#中System.Color.CMYKAssign方法的典型用法代码示例。如果您正苦于以下问题:C# Color.CMYKAssign方法的具体用法?C# Color.CMYKAssign怎么用?C# Color.CMYKAssign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Color
的用法示例。
在下文中一共展示了Color.CMYKAssign方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateMeasureRect
bool CreateMeasureRect()
{
if (CDWin == null || CDWin.ActiveSelection == null || CDWin.ActiveSelection.Shapes.Count == 0 || CDWin.ActiveSelection.Shapes[1].Type != CorelDRAW.cdrShapeType.cdrBitmapShape)
{
MessageBox.Show("No Image selected. Select an Image first");
return false;
}
CalMes = new CalibMeasure();
CalMes.img = CDWin.ActiveSelection.Shapes[1];
CalMes.mesRect = CDWin.ActiveLayer.CreateRectangle2(
CDWin.ActiveWindow.ActiveView.OriginX,
CDWin.ActiveWindow.ActiveView.OriginY,
CDWin.ConvertUnits(3d, CorelDRAW.cdrUnit.cdrCentimeter, CDWin.ActiveDocument.Unit),
CDWin.ConvertUnits(1d, CorelDRAW.cdrUnit.cdrCentimeter, CDWin.ActiveDocument.Unit)
);
Color back = new Color();
back.CMYKAssign(0, 60, 100, 0);
CalMes.mesRect.Selected = true;
CalMes.mesRect.Outline.Width = 0;
CalMes.mesRect.Fill.ApplyUniformFill(back);
CalMes.mesRect.Transparency.ApplyUniformTransparency(0);
CalMes.mesRect.Transparency.MergeMode = CorelDRAW.cdrMergeMode.cdrMergeXOR;
return true;
}
示例2: decorateShape
private void decorateShape(semImage curShape)
{
ShapeRange SR = new ShapeRange();
ShapeRange TextShapes = new ShapeRange();
Shape Brect, Lrect, Wline, Ttext, Gr;
double LmarginH, LmarginV, TmarginH, TmarginV, Theight;
double Lwidth, Wwidth, Wheight, Lheight;
double Left, Bottom, Width, Height;
double oldCenterX, oldCenterY;
double cimgratio;
bool NoBar = false;
Shape s = curShape.imgShape;
semImageData d = curShape.imgData;
double OffsetResolution = s.Bitmap.SizeWidth / s.SizeWidth;
double bCut = 1d - d.CutBottom;
Color White, Black;
White = new Color();
Black = new Color();
Black.CMYKAssign(0, 0, 0, 100);
White.CMYKAssign(0, 0, 0, 0);
oldCenterX = s.CenterX;
oldCenterY = s.CenterY;
Left = s.LeftX;
Bottom = s.BottomY;
cimgratio = (s.SizeHeight * bCut) / s.SizeWidth;
if (d.Width == 0d && d.Height == 0d)
{
Width = s.SizeWidth;
Height = s.SizeHeight * bCut;
}
else if (d.Width == 0d)
{
Height = cmToUnit(d.Height);
Width = Height / cimgratio;
}
else if (d.Height == 0d)
{
Width = cmToUnit(d.Width);
Height = Width * cimgratio;
}
else
{
Width = cmToUnit(d.Width);
Height = cmToUnit(d.Height);
}
double newRatio = Height / Width;
if (newRatio <= cimgratio)
{
s.SizeWidth = Width;
s.SizeHeight = (Width * cimgratio) / bCut;
}
else
{
s.SizeHeight = Height / bCut;
s.SizeWidth = Height / cimgratio;
}
s.LeftX = Left;
s.BottomY = Bottom;
if (d.Mode == (int)CreateMode.Calib)
{
curShape.calcScale();
}
else if (d.Width == 0 || d.BarText == "")
{
NoBar = true;
}
Lwidth = cmToUnit(curShape.imgData.BarLength);
Lheight = ptToUnit(8);
LmarginH = ptToUnit(8);
LmarginV = ptToUnit(4);
TmarginH = ptToUnit(4);
TmarginV = ptToUnit(4);
Theight = ptToUnit(d.FontSize);
Wwidth = Lwidth + 2 * LmarginH;
Wheight = Lheight + LmarginV + TmarginV;
Brect = CDWin.ActiveLayer.CreateRectangle2(Left, Bottom, Width, Height);
Brect.Outline.Color = Black;
Brect.Outline.Width = ptToUnit(d.BorderWidth);
s.Name = "semItemContent";
s.AlignToShape(CorelDRAW.cdrAlignType.cdrAlignTop, Brect);
s.AddToPowerClip(Brect, CorelDRAW.cdrTriState.cdrFalse);
if (d.ValInBar == true)
{
Wheight = Theight + 2 * TmarginV;
}
if (!NoBar)
//.........这里部分代码省略.........