Поиск:

Ответ в темуСоздание новой темы Создание опроса
> как нарисовать нормальную дугу в МФЦ 
:(
    Опции темы
serg405
Дата 26.5.2009, 16:44 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 118
Регистрация: 12.6.2008

Репутация: нет
Всего: нет



здраствуйте!

я пытаюсь нарисовать дугу исполюзуя функцыи DC обекта, типа Arc, ArcTo, AngleArc,

и у меня постояно дуги рисуютса както криво, когда я исполюзую Arc и ArcTo у дуги остаетса хвост... 
а AngleArc вроде и не работает нормально...

ArcTo  - непонятный хвост
user posted image

Arc - кривая дуга..
user posted image

AngleArc - ...
[URL=http://ipicture.ru/]user posted image[/UR

помогите пожалуйста...
PM MAIL   Вверх
Andrey44
Дата 27.5.2009, 07:09 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
***


Профиль
Группа: Завсегдатай
Сообщений: 1501
Регистрация: 4.12.2006
Где: На работе

Репутация: 12
Всего: 26



Arc:
Код

void CDCView::DrawArc(CDC* pDC)
{
   // Fill the client area with a thin circle. The circle's
   // interior is not filled. The circle's perimeter is
   // blue from 6 o'clock to 3 o'clock and red from 3
   // o'clock to 6 o'clock.

   // Get the client area.
   CRect rectClient;
   GetClientRect(rectClient);

   // Make a couple of pens.
   CPen penBlue;
   CPen penRed;
   CPen* pOldPen;

   penBlue.CreatePen(PS_SOLID | PS_COSMETIC, 1, RGB(0, 0, 255));
   penRed.CreatePen(PS_SOLID | PS_COSMETIC, 1, RGB(255, 0, 0));

   // Draw from 3 o'clock to 6 o'clock, counterclockwise,
   // in a blue pen.

   pOldPen = pDC->SelectObject(&penBlue);

   pDC->Arc(rectClient,
      CPoint(rectClient.right, rectClient.CenterPoint().y),
      CPoint(rectClient.CenterPoint().x, rectClient.right));

   // Draw from 6 o'clock to 3 o'clock, counterclockwise,
   // in a red pen.
   pDC->SelectObject(&penRed);

   // Keep the same parameters, but reverse start
   // and end points.
   pDC->Arc(rectClient,
      CPoint(rectClient.CenterPoint().x, rectClient.right),
      CPoint(rectClient.right, rectClient.CenterPoint().y));

   // Restore the previous pen.
   pDC->SelectObject(pOldPen);
}

ArcTo:
Цитата(MSDN)

This function is similar to CDC::Arc, except that the current position is updated. The points (x1,y1) and (x2,y2) specify the bounding rectangle. An ellipse formed by the given bounding rectangle defines the curve of the arc. The arc extends counterclockwise (the default arc direction) from the point where it intersects the radial line from the center of the bounding rectangle to (x3,y3). The arc ends where it intersects the radial line from the center of the bounding rectangle to (x4,y4). If the starting point and ending point are the same, a complete ellipse is drawn.

AngleArc:
Код

pDC->Arc(100, 100, 50, 0.f, 180.f);




--------------------
????? ??, ??????? ?????.  smile 
PM MAIL WWW ICQ   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Visual C++/MFC/WTL | Следующая тема »


 




[ Время генерации скрипта: 0.0549 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.