mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-01 05:29:34 +00:00
Update to 7.8.0 (2359)
This commit is contained in:
parent
a5939ccb34
commit
e8d88e56e4
1875 changed files with 110771 additions and 43473 deletions
|
|
@ -1,5 +1,8 @@
|
|||
package org.telegram.messenger;
|
||||
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
|
||||
import org.telegram.tgnet.TLRPC;
|
||||
import org.telegram.ui.ActionBar.Theme;
|
||||
|
||||
|
|
@ -69,6 +72,19 @@ public class DocumentObject {
|
|||
return getSvgThumb(document, colorKey, alpha, 1.0f);
|
||||
}
|
||||
|
||||
public static SvgHelper.SvgDrawable getSvgRectThumb(String colorKey, float alpha) {
|
||||
Path path = new Path();
|
||||
path.addRect(0, 0, 512, 512, Path.Direction.CW);
|
||||
path.close();
|
||||
SvgHelper.SvgDrawable drawable = new SvgHelper.SvgDrawable();
|
||||
drawable.commands.add(path);
|
||||
drawable.paints.put(path, new Paint(Paint.ANTI_ALIAS_FLAG));
|
||||
drawable.width = 512;
|
||||
drawable.height = 512;
|
||||
drawable.setupGradient(colorKey, alpha);
|
||||
return drawable;
|
||||
}
|
||||
|
||||
public static SvgHelper.SvgDrawable getSvgThumb(TLRPC.Document document, String colorKey, float alpha, float zoom) {
|
||||
if (document == null) {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue