mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
* Painter: fixed issue with subpixe (RM #281), Core: AsString(RGBA), CtrlCore: NoLayoutZoom fix for MSC
git-svn-id: svn://ultimatepp.org/upp/trunk@5026 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3d88cdb997
commit
ea19869432
5 changed files with 12 additions and 3 deletions
|
|
@ -60,6 +60,12 @@ dword Color::Get() const
|
|||
return c & 0xffffff;
|
||||
}
|
||||
|
||||
template <>
|
||||
String AsString(const RGBA& c)
|
||||
{
|
||||
return Format("RGBA(%d, %d, %d, %d)", (int)c.r, (int)c.g, (int)c.b, (int)c.a);
|
||||
}
|
||||
|
||||
Color::operator RGBA() const
|
||||
{
|
||||
RGBA color;
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ struct RGBA : Moveable<RGBA> {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
template <>
|
||||
String AsString(const RGBA& c);
|
||||
|
||||
#ifndef PLATFORM_WIN32
|
||||
inline int GetRValue(dword c) { return (byte)(c >> 0); }
|
||||
inline int GetGValue(dword c) { return (byte)(c >> 8); }
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ void Ctrl::NoLayoutZoom()
|
|||
{
|
||||
GuiLock __;
|
||||
IsNoLayoutZoom = true;
|
||||
Csize = Dsize = 1;
|
||||
Csize = Dsize = Size(1, 1);
|
||||
ReSkin();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void ImageBuffer::Create(int cx, int cy)
|
|||
while(s < e) {
|
||||
s->a = a;
|
||||
a = ~a;
|
||||
s->r = 255;
|
||||
s->r = a ? 255 : 0;
|
||||
s->g = s->b = 0;
|
||||
s++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ void SubpixelFiller::Write(int len)
|
|||
RGBA c = ss ? Mul8(*s++, alpha) : invert ? InvertRGBA(*t) : color;
|
||||
int a;
|
||||
if(t->a != 255)
|
||||
AlphaBlendCover8(*t, c, (q[0] + q[1] + q[2]) / 3);
|
||||
AlphaBlend(*t, c);
|
||||
else
|
||||
if(c.a == 255) {
|
||||
t->r = (c.r * q[0] >> 8) + ((257 - q[0]) * t->r >> 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue