示例#1
0
 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);
 }
示例#2
0
 /**
  * <summary>
  *   Draws a filled rectangular bar at a specified position.
  * <para>
  * </para>
  * </summary>
  * <param name="x1">
  *   the distance from left of layer to the left border of the rectangle, in pixels
  * </param>
  * <param name="y1">
  *   the distance from top of layer to the top border of the rectangle, in pixels
  * </param>
  * <param name="x2">
  *   the distance from left of layer to the right border of the rectangle, in pixels
  * </param>
  * <param name="y2">
  *   the distance from top of layer to the bottom border of the rectangle, in pixels
  * </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 drawBar(int x1, int y1, int x2, int y2)
 {
     return(_objptr.drawBar(x1, y1, x2, y2));
 }