FACT++  1.0
void MGImage::DrawHexagon ( UChar_t *  buf,
int  w,
int  h,
Float_t  x,
Float_t  y,
Float_t  r,
UChar_t  col,
Int_t  style = 1 
)
static

Definition at line 324 of file MGImage.cc.

References DrawLine(), and i.

Referenced by DisableSyncMode(), and FilterLed::DrawHexagon().

325 {
326  const Int_t np = 6;
327 
328  const Double_t dy[np+1] = { .5 , 0. , -.5 , -.5 , 0. , .5 , .5 };
329  const Double_t dx[np+1] = { .2886, .5772, .2886, -.2886, -.5772, -.2886, .2886 };
330 
331  //
332  // calculate the positions of the pixel corners
333  //
334  Double_t x[np+1], y[np+1];
335  for (Int_t i=0; i<np+1; i++)
336  {
337  x[i] = px + dx[i]*d;
338  y[i] = py + dy[i]*d;
339  }
340 
341  for (int i=0; i<6; i++)
342  DrawLine(buf, w, h, x[i], y[i], x[i+1], y[i+1], col, style);
343 }
int i
Definition: db_dim_client.c:21
static void DrawLine(UChar_t *buf, int w, int h, Float_t x1, Float_t y1, Float_t x2, Float_t y2, UChar_t col, Int_t style=1)
Definition: MGImage.cc:279

+ Here is the call graph for this function:

+ Here is the caller graph for this function: