Single-pass phone blur and add License section
- BlurredTextSpan draws the text once with a 5dp blur (no more repeated draws); the number stays unreadable - Add a License section (GPL-2.0-or-later) to both READMEs noting the freedom to redistribute and the independent-fork disclaimer
This commit is contained in:
parent
9b0bccc67d
commit
a46805591b
3 changed files with 31 additions and 6 deletions
14
README.en.md
14
README.en.md
|
|
@ -71,3 +71,17 @@ The output APK is named `FoxiGram-<version>-<code>-<abi>.apk`.
|
|||
- `google-services.json`, signing keystores, and `local.properties` are not
|
||||
committed. Provide your own for release builds.
|
||||
- Based on Nekogram, which is based on Telegram for Android.
|
||||
|
||||
## License
|
||||
|
||||
This project is distributed under the **GNU General Public License v2.0 or
|
||||
later** (GPL-2.0-or-later) — the same license as Telegram for Android and
|
||||
Nekogram, on which it is based.
|
||||
|
||||
This means you are free to use, modify and distribute the app, including sharing
|
||||
it with other people. When you distribute it — original or modified — you must
|
||||
make the source code available under the same terms and keep the attribution.
|
||||
|
||||
FoxiGram is an independent fork and is not affiliated with official Telegram.
|
||||
"Telegram", its logos and trademarks belong to their respective owners.
|
||||
|
||||
|
|
|
|||
15
README.md
15
README.md
|
|
@ -72,3 +72,18 @@ go build -buildmode=c-shared -o ../TMessagesProj/src/main/jniLibs/arm64-v8a/libx
|
|||
- `google-services.json`, ключи подписи и `local.properties` не хранятся в
|
||||
репозитории. Для релизной сборки подставьте свои.
|
||||
- Основан на Nekogram, который основан на Telegram для Android.
|
||||
|
||||
## Лицензия
|
||||
|
||||
Проект распространяется на условиях **GNU General Public License v2.0 или
|
||||
новее** (GPL-2.0-or-later) — как и Telegram для Android и Nekogram, на которых
|
||||
он основан.
|
||||
|
||||
Это означает, что вы можете свободно использовать, изменять и распространять
|
||||
приложение, в том числе передавать его другим людям. При распространении —
|
||||
оригинального или изменённого — необходимо открывать исходный код на тех же
|
||||
условиях и сохранять указание авторства.
|
||||
|
||||
FoxiGram — независимый форк и не связан с официальным Telegram. Названия
|
||||
«Telegram», логотипы и торговые марки принадлежат их правообладателям.
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class BlurredTextSpan extends ReplacementSpan {
|
|||
private int cachePad;
|
||||
|
||||
public BlurredTextSpan(String text) {
|
||||
this(text, AndroidUtilities.dp(7f));
|
||||
this(text, AndroidUtilities.dp(5f));
|
||||
}
|
||||
|
||||
public BlurredTextSpan(String text, float blurRadius) {
|
||||
|
|
@ -104,10 +104,6 @@ public class BlurredTextSpan extends ReplacementSpan {
|
|||
p.setColor(color);
|
||||
p.setTypeface(paint.getTypeface());
|
||||
p.setMaskFilter(new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL));
|
||||
// A strong blur fades the glyphs to near-transparency; draw the blurred
|
||||
// text several times so it stays a dense, unreadable smudge.
|
||||
for (int i = 0; i < 4; i++) {
|
||||
c.drawText(text, pad, cacheBaseline, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue