本文整理汇总了C#中Cairo.ToGdkColor方法的典型用法代码示例。如果您正苦于以下问题:C# Cairo.ToGdkColor方法的具体用法?C# Cairo.ToGdkColor怎么用?C# Cairo.ToGdkColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cairo
的用法示例。
在下文中一共展示了Cairo.ToGdkColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCategory
internal static VBox CreateCategory (string categoryName, string categoryContentMarkup, Cairo.Color foreColor)
{
var vbox = new VBox ();
vbox.Spacing = 8;
if (categoryName != null) {
var catLabel = new FixedWidthWrapLabel ();
catLabel.Markup = categoryName;
catLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
catLabel.FontDescription = FontService.GetFontDescription ("Editor");
vbox.PackStart (catLabel, false, true, 0);
}
var contentLabel = new FixedWidthWrapLabel ();
HBox hbox = new HBox ();
// hbox.PackStart (new Label(), false, true, 10);
contentLabel.Wrap = Pango.WrapMode.WordChar;
contentLabel.BreakOnCamelCasing = false;
contentLabel.BreakOnPunctuation = false;
contentLabel.MaxWidth = 400;
contentLabel.Markup = categoryContentMarkup.Trim ();
contentLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
contentLabel.FontDescription = FontService.GetFontDescription ("Editor");
hbox.PackStart (contentLabel, true, true, 0);
vbox.PackStart (hbox, true, true, 0);
return vbox;
}
示例2: HslColor
public HslColor (Cairo.Color color) : this (color.ToGdkColor ())
{
}
示例3: CreateCategory
internal static VBox CreateCategory (string categoryName, string categoryContentMarkup, Cairo.Color foreColor, Pango.FontDescription font)
{
var vbox = new VBox ();
vbox.Spacing = 8;
if (categoryName != null) {
var catLabel = new FixedWidthWrapLabel ();
catLabel.Markup = categoryName;
catLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
catLabel.FontDescription = font.Copy ();
catLabel.FontDescription.Weight = Pango.Weight.Bold;
catLabel.FontDescription.Size = catLabel.FontDescription.Size + (int)(1 * Pango.Scale.PangoScale);
vbox.PackStart (catLabel, false, true, 0);
}
var contentLabel = new FixedWidthWrapLabel ();
HBox hbox = new HBox ();
// hbox.PackStart (new Label(), false, true, 10);
contentLabel.Wrap = Pango.WrapMode.WordChar;
contentLabel.Spacing = 1;
contentLabel.BreakOnCamelCasing = false;
contentLabel.BreakOnPunctuation = false;
contentLabel.MaxWidth = 400;
contentLabel.Markup = categoryContentMarkup.Trim ();
contentLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
contentLabel.FontDescription = font;
hbox.PackStart (contentLabel, true, true, 0);
vbox.PackStart (hbox, true, true, 0);
return vbox;
}