예제 #1
0
void Slider::setNewMask ()
{
  QBitmap bm(size());
  bm.fill(Qt::color0);

  QBitmap bm_sld(slider->size());
  QPixmap pm = QPixmap::grabWidget(slider);
  bm_sld = pm.createHeuristicMask();

  QPainter painter;
  QBitmap bm_val,bm_min,bm_max;
  bm_val = drawValue();
  bm_min = drawMinValue();
  bm_max = drawMaxValue();

  painter.begin(&bm);
  painter.drawPixmap(slider->x(),slider->y(),bm_sld);
  if (orientation == 0) painter.drawPixmap(0,0,bm_val);
    else if (orientation == 1) painter.drawPixmap(width()/2+10,0,bm_val);
  if (orientation == 0) painter.drawPixmap(0,height()/2+10,bm_min);
    else if (orientation == 1) painter.drawPixmap(0,0,bm_min);
  if (orientation == 0) painter.drawPixmap(width()/2,height()/2+10,bm_max);
    else if (orientation == 1) painter.drawPixmap(0,height()/2,bm_max);
  painter.end();

  setMask(bm);
}
예제 #2
0
파일: Graph.c 프로젝트: HIPERFIT/mlkit
void PutFile()
{

  MakeIdentTable();
  SortIdentTable(); /* Sort identifiers by size. */
  TopBands();       /* Keep only noOfBands bands and put rest in an other group. */
  Dimensions(); 
  Scale();

  #if PRINT_IDENT_TABLE
    printIdentTable();
  #endif  

  /* Start printing graph. */
  Prologue();
  output->Fonts();
  BorderOutlineBox();

  TitleOutlineBox();
  TitleText();
  
  CurvesInit();
  
  Key();
  
  Curves();

  Axes();

  if (showMax)
    drawMaxValue(maxValue, maxValueStr);
  if (mflag) Marks();
  if (cflag) Comments();
  output->Prologue();

  return;
}