Ejemplo n.º 1
0
void MAS::Progress::Draw(Bitmap &canvas) {
   Bitmap bmp = GetBitmap();
   if (orientation == 1) {
      bmp.HorizontalTile(canvas, 0, 0, 0, w(), 2);
      int ww = (int)(w()*GetPosition()/(GetMax() - GetMin()));
      bmp.HorizontalTile(canvas, 1, 0, 0, ww, 2);
   }
   else {
      bmp.VerticalTile(canvas, 0, 0, 0, h(), 2);
      int hh = (int)(h()*GetPosition()/(GetMax() - GetMin()));
      bmp.VerticalTile(canvas, 1, 0, 0, hh, 2);
   }
}
Ejemplo n.º 2
0
void MAS::FrameBorder::Draw(Bitmap &canvas) {
   Bitmap bmp = GetBitmap();
   int off = HasFocus() ? 0 : 1;

   switch (type) {
      case 0:
      case 1:
         bmp.VerticalTile(canvas, off, 0, 0, h(), 2);
         break;

      case 2:
      case 3:
      case 4:
         bmp.HorizontalTile(canvas, off, 0, 0, w(), 2);
         break;
   }
}
Ejemplo n.º 3
0
void MAS::TextBack::Draw(Bitmap &canvas) {
   Bitmap bmp = GetBitmap();
   bmp.HorizontalTile(canvas, HasFocus() ? 0 : 1, 0, 0, w(), 2);
}