首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏程思阳的专栏

    Android tint颜色渲染

    PorterDuff.Mode.SCREEN 取两图层全部区域,交集部分变为透明色 还有另外两个 17.PorterDuff.Mode.ADD 18.PorterDuff.Mode.OVERLAY 那什么是Tint

    75210编辑于 2022-12-18
  • 来自专栏程思阳的专栏

    Android background tint颜色渲染

    PorterDuff.Mode.SCREEN 取两图层全部区域,交集部分变为透明色 还有另外两个 17.PorterDuff.Mode.ADD 18.PorterDuff.Mode.OVERLAY 那什么是Tint android:drawable="@drawable/button_normal" /> </selector> 这是button正常显示的样子: 为button设置tint ().setColorFilter(tint, Mode.DARKEN); 看到了么,效果是叠加,而不是直接覆盖。 使用tint可以保留原来的阴影波纹等效果。 但是如果控件状态转换的时候,颜色不换,则可以采用 b .getBackground().setColorFilter(tint, Mode.DARKEN); 因为这个API在21版本上才有,对于低版本调用的话

    1K30编辑于 2022-11-16
  • 来自专栏韩曙亮的移动开发专栏

    【Android 安装包优化】Tint 着色器 ( 简介 | 布局文件中的 Tint 着色器基本用法 | 代码中使用 Tint 着色器添加颜色效果 )

    文章目录 一、Tint 着色器简介 二、布局文件中的 Tint 着色器基本用法 三、代码中使用 Tint 着色器添加颜色效果 四、参考资料 一、Tint 着色器简介 ---- Tint 着色器的作用是是 可以使图片变色 , 使用该机制可以显示不同颜色的图片 ; 给定一个白色图标图片 , 如果要显示不同颜色的图片 , 可以直接在 ImageView 中设置 android:tint 或 app:tint 属性 , 设置一个颜色值 , 即可将该图片显示为指定颜色的图片 ; 这样一张图片 , 可以显示多种不同颜色的效果 , 从而减少了 APK 打包的图片数量 , 减少了 APK 安装包的大小 ; 该 tint ="@color/purple_700" app:srcCompat="@drawable/ic_plane"/> 二、布局文件中的 Tint 着色器基本用法 ---- Tint 基本用法就是在 ImageView 组件中添加 app:tint 属性 , 为其设置一个颜色值属性值即可 ; 布局文件示例 : <?

    2.5K10编辑于 2023-03-29
  • 来自专栏林德熙的博客

    Unity3D 2019 设置的 Playmode tint 有何作用

    在 Unity3D 编辑器点击运行的时候,此时对整个面板修改的值仅在本次运行生效,当运行结束之后就会回到原来的值。因此为了避免调了半天实际上是在运行模式调的值,咱可以修改 Unity3D 编辑器的界面,让咱可以知道当前是 Unity3D 运行模式

    67920发布于 2020-07-06
  • 来自专栏方亮

    0基础学习Mybatis系列数据库操作框架——字段映射

    Mybatis系列数据库操作框架——增删改操作》的更新操作中,我们定义的SQL Mapper是 <update id="updateElems"> update all_type set info_tint = #{info_tint}, info_sint = #{info_sint} where info_int > #{info_int} </update> Mapper接口新增的方法是 long updateElems(AllType item); 可以看到SQL Mapper自动将info_tint映射到AllType.info_tint。 这种映射成功的前提是AllType定义的字段名和表中列名一致: public class AllType { …… private int info_int; private byte info_tint private short info_sint; } create table all_type( info_int int(10) comment 'int', info_tint

    38300编辑于 2024-05-24
  • 来自专栏云深之无迹

    来自 VISHAY 的超大动态范围光传感器:VEML7700(YUNSWJ 建模闪烁抑制版)

    ], divided by Tint. """ # Average of constant: y = E0 # Average of cosine: # (A/Tint , modes in refresh_table_ms.items(): Tint = Tint_ms / 1000.0 for mode, Ts_ms in modes.items() )) # |sin(pi f Tint)/(pi f Tint)| # Simulate and measure residual RMS (after : att_grid = abs(sinc_pi(f * Tint_grid)) plt.plot(Tint_ms_grid, att_grid, marker='o', label=f"f = 100 mode = 4 Ts_ms = refresh_table_ms[Tint_ms][mode] Tint = Tint_ms/1000.0 Ts = Ts_ms/1000.0 Fs =

    11110编辑于 2026-03-05
  • 来自专栏方亮

    0基础学习Mybatis系列数据库操作框架——增删改操作

    为了让数据维度更加丰富,我们给数据库单行数据映射的对象类增加两个变量——info_tint和info_sint,它们分别对应数据库表中对应的项。 () { return info_tint; } public void setInfo_tint(byte info_tint) { this.info_tint = info_tint; } public short getInfo_sint() { return info_sint; } public void <foreach item="item" collection="list" separator=","> (#{item.info_int}, #{item.info_tint Mapper配置 <update id="updateElems"> update all_type set info_tint = #{info_tint}, info_sint = #{info_sint

    22400编辑于 2024-05-24
  • 来自专栏Android知识点总结

    3-VIV-Android控件之ImageView

    直接继承自View,安卓源码1600+,算是个小类,但图片显示基本上都用它 [2].scaleType有点小烦,不过看图还是挺清晰的 [3].cropToPadding、adjustViewBounds、tint ImageView_maxWidth * @attr ref android.R.styleable#ImageView_maxHeight * @attr ref android.R.styleable#ImageView_tint wrap_content" android:maxHeight="50dp" android:maxWidth="50dp" android:adjustViewBounds="true" ---- 四、tint tint.png android:tint="#22FF4081" ---- 五、最重要的要数设置图片了 1.xml设置图片 android:src="@mipmap/iv_50x40" 2.代码中设置

    1.1K20发布于 2018-09-29
  • 来自专栏猿说编程

    IOS – OpenGL ES 调节图像白平衡/色温 GPUImageWhiteBalanceFilter

    texture2D(inputImageTexture, textureCoordinate); mediump vec3 yiq = RGBtoYIQ * source.rgb; //adjusting tint yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226); lowp vec3 rgb = YIQtoRGB * yiq; sampler2D inputImageTexture; varying vec2 textureCoordinate; uniform float temperature; uniform float tint texture2D(inputImageTexture, textureCoordinate); vec3 yiq = RGBtoYIQ * source.rgb; //adjusting tint yiq.b = clamp(yiq.b + tint*0.5226*0.1, -0.5226, 0.5226); vec3 rgb = YIQtoRGB * yiq; vec3

    66440编辑于 2023-03-23
  • 来自专栏Linux驱动

    32.QT-制作最强电压电阻表盘,可以自定义颜色,图标,文字标签(也可以用来当其它表盘)

    = SingleSlideColor; QRadialGradient Radial(0,0,radius*0.90); Tint_SlideColor.setAlpha(40 ); Radial.setColorAt(1,Tint_SlideColor); Radial.setColorAt(SlideBottom-0.005,Tint_SlideColor) Radial.setColorAt(0,Qt::transparent); Radial.setColorAt(SlideBottom-0.006,Qt::transparent); Tint_SlideColor = SingleSlideColor; Tint_SlideColor.setAlpha(50); Radial.setColorAt(SlideCenterBottom-0.03 ,Tint_SlideColor); Radial.setColorAt(SlideCenterTop+0.03,Tint_SlideColor); Tint_SlideColor =

    1.6K30发布于 2018-07-30
  • 来自专栏博客迁移同步

    Spring高手之路13——BeanFactoryPostProcessor与BeanDefinitionRegistryPostProcessor解析

    假设我们需要为一系列的Tint对象赋值名字,这个名字就是bean的名字,而且要在bean实例化之前完成。 定义bean我们定义一个简单的Tint抽象类以及其两个子类Blue和Yellow:package com.example.demo.bean;public abstract class Tint { com.example.demo.bean;import org.springframework.stereotype.Component;@Componentpublic class Blue extends Tint 如果bean是Tint类型,它的'label'属性将被设置。 * * @param bean 将要处理的bean对象。 ) { Tint tint = (Tint) bean; tint.setLabel("postProcessAfterInitialization_" +

    2.5K53编辑于 2023-08-31
  • 来自专栏全栈程序员必看

    matlab中dde23函数_时滞模型的matlab编程

    tint = linspace(0,5,10); Sint = deval_r(sol,tint) hold on plot(tint,Sint,'o'); Run your program to Baker’); xlabel(‘time t’); ylabel(‘solution y’); legend(‘y_1′,’y_2′,’y_3′,’Location’,’NorthWest’); tint = linspace(0,5,10); Sint = deval(sol,tint) hold on plot(tint,Sint,’o’); 或者 按如下代码执行: clear;clc

    3K20编辑于 2022-11-10
  • 来自专栏伟大程序猿的诞生

    Android浸入式

    color value. */ public static final int DEFAULT_TINT_COLOR = 0x99000000; private static View.VISIBLE : View.GONE); } } /** * Apply the specified color tint to all system * * @param color The color of the background tint. */ public void setTintColor(int * * @param color The color of the background tint. */ public void setStatusBarTintColor mStatusBarTintView.setAlpha(alpha); } } /** * Apply the specified color tint

    78430发布于 2019-01-21
  • 来自专栏Android知识点总结

    Android控件之ImageView

    直接继承自View,安卓源码1600+,算是个小类,但图片显示基本上都用它 2.scaleType有点小烦,不过看图还是挺清晰的 3.cropToPadding、adjustViewBounds、tint ImageView_maxWidth * @attr ref android.R.styleable#ImageView_maxHeight * @attr ref android.R.styleable#ImageView_tint wrap_content" android:maxHeight="50dp" android:maxWidth="50dp" android:adjustViewBounds="true" --- 四、tint 覆盖色:最好有透明度的颜色,不然图片就全盖住了 [tint.png] android:tint="#22FF4081" --- 五、最重要的要数设置图片了 1.xml设置图片 android:src="

    1.4K00发布于 2018-09-03
  • 来自专栏向治洪

    android自定义状态栏颜色

     color value.        */       public static final int DEFAULT_TINT_COLOR = 0x99000000;       private View.VISIBLE : View.GONE);           }       }       /**        * Apply the specified color tint         *        * @param color The color of the background tint.        */       public void setTintColor            setNavigationBarAlpha(alpha);       }       /**        * Apply the specified color tint mStatusBarTintView.setLayoutParams(params);           mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR

    2.1K60发布于 2018-02-01
  • 来自专栏python3

    Some Modifications

    Create a file: Default.sublime-theme [ { "class": "sidebar_container", "layer0.tint 1], "layer0.opacity": 1.0 }, { "class": "overlay_control", "layer0.tint 1.0, "content_margin": [4, 4] }, { "class": "popup_control", "layer0.tint : "text_line_control", "layer0.texture": "Theme - Default/input_field.png", "layer0.tint ": 0, // tint layer 0 "tint_modifier": [255, 0, 0, 0], "layer1.texture": "",

    66730发布于 2020-01-03
  • 来自专栏BennuCTech

    Android中的资源复用小技巧

    下面是一个示例额: <vector android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android 变色 变色就是着色,在android5.0版本google出了着色器tint,可以非常方便的对图片进行着色。 android:src="@mipmap/ic_launcher" android:tint="#FFF" /> 这样可以将图片变成白色的。 但是有时候我们需要在其他xml resource中使用,比如style中使用drawable,比如想使用一个黑色的箭头,但是我们只有白色的箭头,这时候就没有tint这个属性了,那么怎么办? http://schemas.android.com/apk/res/android" android:src="@drawable/white_arrow" android:tint

    1.4K10编辑于 2021-12-10
  • 来自专栏Android技术分享

    Android高级开发-APK极致优化

    Tint着色器 yifeng.studio/2017/03/30/… 自 API 21 (Android L)开始,Android SDK 引入 tint 着色器,可以随意改变安卓项目中图标或者 View tint 或 backgroundTint 属性,与 src 或 background 属性一定是对应成对出现的。 ? ? <! DrawableCompat.setTint(tintDrawable, Color.parseColor("#00ff00")); ImageView backTintImg = (ImageView)findViewById(R.id.tint ; DrawableCompat.setTintList(tintlistDrawable, ContextCompat.getColorStateList(this, R.color.custom_tint

    1.5K40发布于 2019-06-24
  • 来自专栏web秀

    Vue + Vuex + Element UI实现动态全局主题颜色

    ('GET', url) xhr.send() }, getThemeCluster (theme) { const tintColor = (color, tint green = parseInt(color.slice(2, 4), 16) let blue = parseInt(color.slice(4, 6), 16) if (tint === 0) { return [red, green, blue].join(',') } else { red += Math.round(tint * (255 - red)) green += Math.round(tint * (255 - green)) blue += Math.round(tint

    4.4K20发布于 2019-09-04
  • 来自专栏用户10004205的专栏

    Unity Button中Transition的四种类型

    Button组件中的Transition属性用于设置用户交互的响应方式,包含四种类型: 1.None 2.Color Tint 3.Sprite Swap 4.Animation Color Tint 将Transition设为Color Tint类型,用户与Button交互时,按钮的颜色会进行变化,这也是我们创建一个Button时默认的Transition类型,如图所示

    1.4K20编辑于 2022-08-29
领券