public void DisplayError(string msg) { _bgLayer.reset(); _bgLayer.selectGrayPen(255); _bgLayer.drawBar(0, 0, _w, _h); _bgLayer.selectColorPen(0); _bgLayer.drawText(_w / 2, _h / 3, YDisplayLayer.ALIGN.CENTER, "ERROR !"); _bgLayer.drawText(_w / 2, _h * 2 / 3, YDisplayLayer.ALIGN.CENTER, msg); }
/** * <summary> * Selects the pen color for all subsequent drawing functions, * including text drawing. * <para> * The pen color is provided as an RGB value. * For grayscale or monochrome displays, the value is * automatically converted to the proper range. * </para> * </summary> * <param name="color"> * the desired pen color, as a 24-bit RGB value * </param> * <returns> * <c>0</c> if the call succeeds. * </returns> * <para> * On failure, throws an exception or returns a negative error code. * </para> */ public virtual int selectColorPen(int color) { return(_objptr.selectColorPen(color)); }