Minor Painter and ide fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@901 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-02-24 14:02:05 +00:00
parent abd211dfbe
commit 1410f380db
4 changed files with 16 additions and 40 deletions

View file

@ -84,36 +84,6 @@ void SubpixelFiller::Start(int minx, int maxx)
}
}
inline
void SubpixelFiller::Render1(int val)
{
int16 *w = v;
int h = val / 9;
int h2 = h + h;
w[-2] += h;
w[-1] += h2;
w[0] += val - h2 - h2 - h2;
w[1] += h2;
w[2] += h;
w[3] = 0;
v++;
}
void SubpixelFiller::Render2(int val)
{
int16 *w = v;
int h = val / 9;
int h2 = h + h;
w[-2] += h;
w[-1] += h2 + h;
w[0] += val - h2 - h2 - h2 + h2;
w[1] += h2 + val - h2 - h2 - h2;
w[2] += h + h2;
w[3] = h;
w[4] = 0;
v += 2;
}
void SubpixelFiller::Render(int val)
{
int16 *w = v;
@ -232,8 +202,14 @@ void SubpixelFiller::Render(int val, int len)
while(t < e)
AlphaBlend(*t++, ss ? Mul8(*s++, alpha) : color);
else
while(t < e)
AlphaBlendCover8(*t++, ss ? Mul8(*s++, alpha) : color, val);
if(ss)
while(t < e)
AlphaBlendCover8(*t++, Mul8(*s++, alpha), val);
else {
RGBA c = Mul8(color, val);
while(t < e)
AlphaBlend(*t++, c);
}
v = begin = sbuffer + 3;
v[0] = h + h + h;
v[1] = h;

View file

@ -36,8 +36,6 @@ struct SubpixelFiller : Rasterizer::Filler {
void Write(int len);
void RenderN(int val, int h, int n);
void Render2(int val);
void Render1(int val);
void Start(int minx, int maxx);
void Render(int val);

View file

@ -38,9 +38,10 @@ void AbbreviationsDlg::Finish(const String& s)
void AbbreviationsDlg::Add()
{
String s;
EditText(s, "New abbreviation", "Keyword", CharFilterAlpha);
abbr.Add(s, Null);
Finish(s);
if(EditText(s, "New abbreviation", "Keyword", CharFilterAlpha)) {
abbr.Add(s, Null);
Finish(s);
}
}
void AbbreviationsDlg::Remove()
@ -55,9 +56,10 @@ void AbbreviationsDlg::Edit()
if(!abbr.IsCursor())
return;
String s = abbr.GetKey();
EditText(s, "Edit keyword", "Keyword", CharFilterAlpha);
abbr.Set(0, s);
Finish(s);
if(EditText(s, "Edit keyword", "Keyword", CharFilterAlpha)) {
abbr.Set(0, s);
Finish(s);
}
}
AbbreviationsDlg::AbbreviationsDlg()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After