Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. CRect rect;
  2. GetClientRect(&rect);
  3.  
  4. double dAngle = angle*M_PI / 180.0;
  5. double tangens = tan(dAngle);
  6. double t = rect.Width() - tangens;
  7. double y1 = rect.bottom - t;
  8.  
  9. POINT points[3] = { {0,clientRect.bottom}, {clientRect.right,y1}, {clientRect.right,clientRect.bottom}};
  10.  
  11. CBrush hatchBrush;
  12. hatchBrush.CreateHatchBrush(HS_FDIAGONAL, RGB(120, 120, 56));
  13. CBrush *oldBrush = pDC->SelectObject(&hatchBrush);
  14.  
  15. pDC->SetBkColor(RGB(50, 50, 50));
  16.  
  17. pDC->Polygon(points, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement