Exemplo n.º 1
0
 public override void OnGLPaint(C2DGraphics gr)
 {
     base.OnGLPaint(gr);
     if (mGLImageCach == null)
     {
         mGLImageCach = gr.GetImage(mGLImage);
         if (mGLImageCach == null)
             return;
         gr.SetColor(Style.ForeColor);
         gr.Image(mGLImageCach, 0, 0, mGLImageCach.w, mGLImageCach.h, 0, 0, Width, Height);
     }
 }
 public override void OnGLPaint(C2DGraphics gr)
 {
     base.OnGLPaint(gr);
     if (mGLImageCach == null)
     {
         mGLImageCach = gr.GetImage(mGLImage);
         if (mGLImageCach == null)
             return;
         mSubImgWidth = mGLImageCach.w / Style.SubImgCount;
     }
     GuiControlStyle stl = Style;
     if (stl.SubImgCount == 4)
         GLPaint4(gr);
     if (stl.SubImgCount == 1)
         GLPaint1(gr, stl);
     C2DImage cimg = stl.CheckedImageCach;
     if (Enabled && (cimg != null))
     {
         int chimgw = cimg.w / 2;
         int posx = Checked ? chimgw : 0;
         gr.SetColor(stl.CheckedColor);
         gr.Image(cimg, posx, 0, chimgw, cimg.h, 0, 0, Width, Height);
     }
 }