public TextAttr(Colour colText, Colour colBack) : this(colText, colBack, null, TextAttrAlignment.wxTEXT_ALIGNMENT_DEFAULT) { }
public Pen(Colour colour, int width) : this(colour, width, FillStyle.wxSOLID) { }
public Pen(Colour col, int width, FillStyle style) : base(wxPen_ctor(Object.SafePtr(col), width, style)) { }
public void OnColorChoice(object sender, Event evt) { wx.Object obj = evt.EventObject; SkinElementColor el = null; if (obj == m_background.m_rgbSelector) { el = m_background; } else if (obj == m_freeTrack.m_rgbSelector) { el = m_freeTrack; } else if (obj == m_reservedTrack.m_rgbSelector) { el = m_reservedTrack; } else if (obj == m_reservedShunting.m_rgbSelector) { el = m_reservedShunting; } else if (obj == m_occupiedTrack.m_rgbSelector) { el = m_occupiedTrack; } else if (obj == m_workingTrack.m_rgbSelector) { el = m_workingTrack; } else if (obj == m_outline.m_rgbSelector) { el = m_outline; } else if (obj == m_text.m_rgbSelector) { el = m_text; } else { return; } byte rv, gv, bv; String str; str = el.m_r.Value; rv = Globals.wxStrtoul(str, 0, 0); str = el.m_g.Value; gv = Globals.wxStrtoul(str, 0, 0); str = el.m_b.Value; bv = Globals.wxStrtoul(str, 0, 0); Colour elCol = new wx.Colour(rv, gv, bv); ColourData data = new ColourData(); data.ChooseFull = (true); data.Colour = (elCol); ColourDialog dialog = new ColourDialog(this, data); if (dialog.ShowModal() == ShowModalResult.OK) { ColourData retData = dialog.ColourData; wx.Colour col = retData.Colour; byte v = col.Red; str = String.Format(wxPorting.T("%d"), v); el.m_r.Value = (str); v = col.Green; str = String.Format(wxPorting.T("%d"), v); el.m_g.Value = (str); v = col.Blue; str = String.Format(wxPorting.T("%d"), v); el.m_b.Value = (str); } }
public Pen(Colour colour) : this(colour, 1, FillStyle.wxSOLID) { }
//----------------------------------------------------------------------------- public string FindName(Colour colour) { return(new wxString(wxColourDatabase_FindName(wxObject, Object.SafePtr(colour)), true)); }
//----------------------------------------------------------------------------- public Pen FindOrCreatePen(Colour colour, int width, int style) { return(new Pen(wxPenList_FindOrCreatePen(wxObject, Object.SafePtr(colour), width, style))); }
//--------------------------------------------------------------------- public bool GetPixel(int x, int y, Colour col) { return(wxDC_GetPixel(wxObject, x, y, Object.SafePtr(col))); }
public bool GetPixel(Point pt, Colour col) { return(GetPixel(pt.X, pt.Y, col)); }
public bool FloodFill(Point pt, Colour col) { return(FloodFill(pt, col, FloodStyle.wxFLOOD_SURFACE)); }
public bool FloodFill(Point pt, Colour col, int style) { return(FloodFill(pt.X, pt.Y, col, style)); }
public bool FloodFill(int x, int y, Colour col, int style) { return(wxDC_FloodFill(wxObject, x, y, Object.SafePtr(col), style)); }
//--------------------------------------------------------------------- public bool FloodFill(int x, int y, Colour col) { return(FloodFill(x, y, col, FloodStyle.wxFLOOD_SURFACE)); }
//--------------------------------------------------------------------- public void SetTextBackground(Colour colour) { wxWindowDC_SetTextBackground(wxObject, Object.SafePtr(colour)); }
public TextAttr(Colour colText, Colour colBack, Font font) : this(colText, colBack, font, TextAttrAlignment.wxTEXT_ALIGNMENT_DEFAULT) { }
public static void setBackgroundColor(wx.Colour col) { int rgb = curSkin.background; col.Set((byte)(rgb >> 16), (byte)((rgb >> 8) & 0xFF), (byte)(rgb & 0xFF)); }
public TextAttr(Colour colText, Colour colBack, Font font, TextAttrAlignment alignment) : this(wxTextAttr_ctor(Object.SafePtr(colText), Object.SafePtr(colBack), Object.SafePtr(font), (int)alignment), true) { }
public Mask(Bitmap bitmap, Colour colour) : this(wxMask_ctorByBitmpaColour(Object.SafePtr(bitmap), Object.SafePtr(colour))) { }
//----------------------------------------------------------------------------- public void AddColour(string name, Colour colour) { wxColourDatabase_AddColour(wxObject, name, Object.SafePtr(colour)); }
//--------------------------------------------------------------------- public bool Create(Bitmap bitmap, Colour colour) { return(wxMask_CreateByBitmapColour(wxObject, Object.SafePtr(bitmap), Object.SafePtr(colour))); }
//----------------------------------------------------------------------------- public Brush FindOrCreateBrush(Colour colour, int style) { return(new Brush(wxBrushList_FindOrCreateBrush(wxObject, Object.SafePtr(colour), style))); }
//--------------------------------------------------------------------- public bool Read(string key, ref Colour val) { Colour def = new Colour(0, 0, 0); return(Read(key, ref val, def)); }