Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi How to draw color circle? (https://www.delphipraxis.net/167074-how-draw-color-circle.html)

WojTec 12. Mär 2012 13:48

How to draw color circle?
 
Liste der Anhänge anzeigen (Anzahl: 1)
I want to draw circles like in attachment (RGB and RYB). I want to only know how to draw circle filled with some colors spectrum, routine for RYB values I already have.

Medium 12. Mär 2012 14:09

AW: How to draw color circle?
 
What you deem to be RGB is actually drawn using HSV. (Have a look here, the upper right in the topmost image.) So you basically go through a bitmap pixel by pixel, determin the angle and distance to the bitmap's center pixel, and use these for hue and saturation respectively. Vaule is simply fixed at 1. It naturally becomes a circle, since distances > 1 from the center would result in invalid parameters for HSV anyways.

freeway 12. Mär 2012 16:54

AW: How to draw color circle?
 
Solution with source code here http://www.efg2.com/Lab/Graphics/Colors/HSV.htm


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:25 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz