Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Вывести графику на Canvas с Anti-Aliasing'ом [D7, WinXP]


Страницы:   1 2 3

hypnotize ©   (2007-03-10 11:45:00) 

Здратвуйте Мастера! Не знает ли кто-нибудь из присутвующих как выводить на Канву графику (с Трансперентом) со сглаживанием (Анти-Алиасингом)? То есть нету ли какого либо аналога процедуры Canvas.Draw(x,y,graphic);только, со сглаживанием)


hypnotize   (2007-03-10 13:43:00) [41]

Ы, как много информации, буду изучать) спасибо


hypnotize   (2007-03-10 13:43:00) [42]

Ы, как много информации, буду изучать)


oxffff   (2007-03-10 13:35:00) [43]

Анти-Алиас здесь
Graphics::SetSmoothingMode Method

The SmoothingMode enumeration specifies the type of smoothing (antialiasing) that is applied to lines and curves. This enumeration is used by the GetSmoothingMode and SetSmoothingMode methods of the Graphics class.

Syntax

typedef enum {
   SmoothingModeInvalid = QualityModeInvalid,
   SmoothingModeDefault = QualityModeDefault,
   SmoothingModeHighSpeed = QualityModeLow,
   SmoothingModeHighQuality = QualityModeHigh,
   SmoothingModeNone,
   SmoothingModeAntiAlias8x4,
   SmoothingModeAntiAlias = SmoothingModeAntiAlias8x4,
   SmoothingModeAntiAlias8x8
} SmoothingMode;

Constants

SmoothingModeInvalid
Reserved.

SmoothingModeDefault
Specifies that smoothing is not applied.

SmoothingModeHighSpeed
Specifies that smoothing is not applied.

SmoothingModeHighQuality
Specifies that smoothing is applied using an 8 X 4 box filter.

SmoothingModeNone
Specifies that smoothing is not applied.

SmoothingModeAntiAlias8x4
Specifies that smoothing is applied using an 8 X 4 box filter.

SmoothingModeAntiAlias
Specifies that smoothing is applied using an 8 X 4 box filter.

SmoothingModeAntiAlias8x8
Specifies that smoothing is applied using an 8 X 8 box filter.


oxffff   (2007-03-10 13:27:00) [44]

Если тебе нужен Анти-Алиасинг тогда используй GDI+

SetCompositingMode Method у TGPGraphic

CompositingModeSourceOver
Specifies that when a color is rendered, it is blended with the background color. The blend is determined by the alpha component of the color being rendered.

CompositingModeSourceCopy
Specifies that when a color is rendered, it overwrites the background color. This mode cannot be used along with TextRenderingHintClearTypeGridFit.

Graphics::SetInterpolationMode Method у TGPGraphic

Constants

InterpolationModeInvalid
Used internally

InterpolationModeDefault
Specifies the default interpolation mode.

InterpolationModeLowQuality
Specifies a low-quality mode.

InterpolationModeHighQuality
Specifies a high-quality mode.

InterpolationModeBilinear
Specifies bilinear interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 50 percent of its original size.

InterpolationModeBicubic
Specifies bicubic interpolation. No prefiltering is done. This mode is not suitable for shrinking an image below 25 percent of its original size.

InterpolationModeNearestNeighbor
Specifies nearest-neighbor interpolation.

InterpolationModeHighQualityBilinear
Specifies high-quality, bilinear interpolation. Prefiltering is performed to ensure high-quality shrinking.

InterpolationModeHighQualityBicubic
Specifies high-quality, bicubic interpolation. Prefiltering is performed to ensure high-quality shrinking. This mode produces the highest quality transformed images.

Вот и все.


oxffff   (2007-03-10 13:23:00) [45]

Есть eще GDI функции BitBlt,MaskBlt,StretchBlt.


oxffff   (2007-03-10 13:20:00) [46]

Тебе поможет GDI+.

Здесь порт на delphi
     {******************************************************************}
     { GDI+ API                                                         }
     {                                                                  }
     { home page : http://www.progdigy.com                             }
     { email     : hgourvest@progdigy.com                               }
     {                                                                  }
     { date      : 15-02-2002                                           }
     {                                                                  }
     { The contents of this file are used with permission, subject to   }
     { the Mozilla Public License Version 1.1 (the "License"); you may  }
     { not use this file except in compliance with the License. You may }
     { obtain a copy of the License at                                  }
     { http://www.mozilla.org/MPL/MPL-1.1.html                         }
     {                                                                  }
     { Software distributed under the License is distributed on an      }
     { "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
     { implied. See the License for the specific language governing     }
     { rights and limitations under the License.                        }
     {                                                                  }
     { *****************************************************************}


hypnotize   (2007-03-10 12:41:00) [47]

Выводить нужно Bitmap с Transperent:=true;(невидимая часть фиолетовым цветом закрашена) , но после вывода очень заметны грани, нельзя ли их сгладить как нить? Дело в том что я сам не понимаю принцип работы Анти Алиасинга, я нашел в инете один примерчик, но он жуууутко тормозит.
А как отрисовать картинку с AlphaBlend'ом?


Ricks   (2007-03-10 12:32:00) [48]

Может нужна 32-х битная картинка?
Тогда смотри AlphaBlend или пиши свою процедуру!


GrayFace   (2007-03-10 12:13:00) [49]

Разве картинку возможно выводить с антиальясингом? По сабжу ничего не скажу, погугли, для С++ имеется библиотека с такими штуками.


Ricks   (2007-03-10 12:09:00) [50]

Аналога нет, и уточни что тебе надо рисовать? Картинку или примитивы?


Страницы:   1 2 3

Наверх

Титульная страница Поиск, карта сайта Написать письмо