In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Mixers exist to accommodate different pixel formats for different platforms and different needs. There are three types of mixers: agg::rgba, agg:: rgba8, and agg:: rgba16, which are used to specify colors, rgba is stored as double per channel, rgba8 is unsigned char, and rgba16 is int or long int; mixers function like RGB and COLORREF macros in the Win32API.
Special note for agg::rgba: Although each component is stored using double type, in fact, the value interval is [0,1], and the value of each component of agg::rgba8 is [0,255]
header #include "agg_pixfmt_rgba.h"
type definition
struct rgba8; //Yes, you are not mistaken, it is a structure, not a class…
elementary member function
rgba8(unsigned r, unsigned g, unsigned b,unsigned a)
No need to explain it, maximum 255;
clear(), no_color()
All four channels are cleared, that is, they become colorless.
transparent()
alpha cleared, transparent;
opacity()
Returns transparency, represented by double;
gradient(agg::rgba8 &c, double k)
Color gradient, that is, the color changes from the original color gradually to c, the rate of change is k;
add(agg::rgba8 &c, unsinged cover)
Color Overlay, superimposing a color c with transparency of cover/255;
member variables
r, g, b, a are unsigned integers;
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.