当前位置: 首页 > news >正文

脉脉用的什么技术做网站公司网页制作需要多少钱

脉脉用的什么技术做网站,公司网页制作需要多少钱,做月亮的网站背景图片,简单产品设计方案模板鸿蒙开发-UI-组件 鸿蒙开发-UI-组件2 鸿蒙开发-UI-组件3 鸿蒙开发-UI-气泡/菜单 鸿蒙开发-UI-页面路由 鸿蒙开发-UI-组件导航-Navigation 鸿蒙开发-UI-组件导航-Tabs 文章目录 一、基本概念 二、图片资源加载 1. 存档图类型数据源 2.多媒体像素图 三、显示矢量图 四、图片…

鸿蒙开发-UI-组件

鸿蒙开发-UI-组件2

鸿蒙开发-UI-组件3

鸿蒙开发-UI-气泡/菜单

鸿蒙开发-UI-页面路由

鸿蒙开发-UI-组件导航-Navigation

鸿蒙开发-UI-组件导航-Tabs

文章目录

一、基本概念

二、图片资源加载

1. 存档图类型数据源

2.多媒体像素图

三、显示矢量图

四、图片显示相关属性

1.设置图片缩放类型

2.图片插值

3.设置图片重复样式

4.设置图片渲染模式

5.设置图片解码尺寸

6.为图片添加滤镜效果

7.同步加载图片

五、图片显示相关事件

总结


前言

上文详细学习了组件导航组件Tabs的使用场景,以及不同的导航布局方式,同时也学习了导航栏的使用模式(固定,滚动)以及自定义导航栏的使用。本文学习鸿蒙开发UI图形显示相关知识

一、基本概念

 图片显示需要使用Image组件,支持多种图片格式,包括png、jpg、bmp、svg和gif

Image通过调用如下接口来创建

Image(src: string | Resource | media.PixelMap)

二、图片资源加载

Image支持加载存档图、多媒体像素图两种类型

1. 存档图类型数据源

2.多媒体像素图

三、显示矢量图

Image组件可显示矢量图(svg格式的图片)

svg格式的图片可以使用fillColor属性改变图片的绘制颜色

Image($r('app.media.cloud')).width(50)
.fillColor(Color.Blue) 
原始图片颜色设置绘制颜色后的svg图片

四、图片显示相关属性

Image组件设置属性可以使图片显示更灵活,达到一些自定义的效果

1.设置图片缩放类型

Image组件objectFit取值显示说明
objectFit(ImageFit.Contain)保持宽高比进行缩小或者放大,使得图片完全显示在显示边界内
objectFit(ImageFit.Cover)保持宽高比进行缩小或者放大,使得图片两边都大于或等于显示边界
objectFit(ImageFit.Auto)自适应显示
objectFit(ImageFit.Fill)不保持宽高比进行放大缩小,使得图片充满显示边界
objectFit(ImageFit.ScaleDown)保持宽高比显示,图片缩小或者保持不变
objectFit(ImageFit.None)保持原有尺寸显示

2.图片插值

当原图分辨率较低并且放大显示时,图片会模糊出现锯齿。

使用interpolation属性对图片进行插值,使图片显示得更清晰

Image组件interpolation取值显示效果
interpolation(ImageInterpolation.None)
interpolation(ImageInterpolation.Low)
interpolation(ImageInterpolation.Medium)
interpolation(ImageInterpolation.High)

3.设置图片重复样式

通过objectRepeat属性设置图片的重复样式方式

Image组件objectRepeat取值显示说明显示效果
objectRepeat(ImageRepeat.XY)在水平轴和竖直轴上同时重复绘制图片
objectRepeat(ImageRepeat.Y)只在竖直轴上重复绘制图片
objectRepeat(ImageRepeat.X)只在水平轴上重复绘制图片

4.设置图片渲染模式

通过renderMode属性设置图片的渲染模式为原色或黑白

Image组件renderMode取值显示说明显示效果
renderMode(ImageRenderMode.Original)设置图片的渲染模式为原色
renderMode(ImageRenderMode.Template)设置图片的渲染模式为黑白

5.设置图片解码尺寸

通过sourceSize属性设置图片解码尺寸,降低图片的分辨率

//将原图片解码为150*150
Image($r('app.media.example')).sourceSize({width: 150,height: 150})

6.为图片添加滤镜效果

通过colorFilter修改图片的像素颜色,为图片添加滤镜

代码示例

@Entry
@Component
struct Index {build() {Column() {Row() {Image($r('app.media.example')).width('40%').margin(10)Image($r('app.media.example')).width('40%').colorFilter([1, 1, 0, 0, 0,0, 1, 0, 0, 0,0, 0, 1, 0, 0,0, 0, 0, 1, 0]).margin(10)}.width('100%').justifyContent(FlexAlign.Center)}}
}

UI渲染

7.同步加载图片

一般情况下,图片加载流程会异步进行,以避免阻塞主线程,影响UI交互。但是特定情况下,图片刷新时会出现闪烁,这时可以使用syncLoad属性,使图片同步加载,从而避免出现闪烁。

注:如果图片加载较长时间导致页面无法响应场景,不建议使用同步加载

Image($r('app.media.icon')).syncLoad(true)

五、图片显示相关事件

Image组件上绑定onComplete事件,图片加载成功后可以获取图片的必要信息。如果图片加载失败,也可以通过绑定onError回调来获得结果

代码示例

@Entry
@Component
struct MyComponent {@State widthValue: number = 0@State heightValue: number = 0@State componentWidth: number = 0@State componentHeight: number = 0build() {Column() {Row() {Image($r('app.media.ic_img_2')).width(200).height(150).margin(15)
//step1:定义图片加载完成后,获取图片的相关属性.onComplete(msg => {if(msg){this.widthValue = msg.widththis.heightValue = msg.heightthis.componentWidth = msg.componentWidththis.componentHeight = msg.componentHeight}})
//step2:定义图片获取失败,打印结果.onError(() => {console.info('load image fail')})
//step3:通过状态变量获取图片属性数据,图片加载完成状态变量数据变更,Image组件重新渲染.overlay('width: ' + String(this.widthValue) + ', height: ' + String(this.heightValue) + 'componentWidth: ' + String(this.componentWidth) + 'componentHeight: ' + String(this.componentHeight), {align: Alignment.Bottom,offset: { x: 0, y: 60 }})}}}
}

UI渲染


总结

本文详细学习了鸿蒙开发UI图片显示相关知识,学习了图片资源加载的两种类型,以及矢量图的显示,同时学习了图片渲染组件的相关属性和相关事件的使用方式和效果。下文将学习鸿蒙开发UI图形绘制。


文章转载自:
http://dinncoamphidiploid.ssfq.cn
http://dinncochiller.ssfq.cn
http://dinncoadenyl.ssfq.cn
http://dinncorigidify.ssfq.cn
http://dinncogamey.ssfq.cn
http://dinncodrawdown.ssfq.cn
http://dinncoprincipate.ssfq.cn
http://dinncosuperabundant.ssfq.cn
http://dinncoindies.ssfq.cn
http://dinncopipeful.ssfq.cn
http://dinncouptime.ssfq.cn
http://dinncopap.ssfq.cn
http://dinncomartemper.ssfq.cn
http://dinncoretribution.ssfq.cn
http://dinncoholdfast.ssfq.cn
http://dinncohospital.ssfq.cn
http://dinncoexaminationist.ssfq.cn
http://dinncoinspective.ssfq.cn
http://dinncocynology.ssfq.cn
http://dinncohazemeter.ssfq.cn
http://dinncodeaminize.ssfq.cn
http://dinncoabstersive.ssfq.cn
http://dinncowarpwise.ssfq.cn
http://dinncosnorty.ssfq.cn
http://dinncomunch.ssfq.cn
http://dinncosubagency.ssfq.cn
http://dinncolinolenate.ssfq.cn
http://dinncophotosensitive.ssfq.cn
http://dinncosalver.ssfq.cn
http://dinncoamie.ssfq.cn
http://dinncopia.ssfq.cn
http://dinncotergeminate.ssfq.cn
http://dinncoarcograph.ssfq.cn
http://dinncopuzzlingly.ssfq.cn
http://dinncointerdigital.ssfq.cn
http://dinncolargamente.ssfq.cn
http://dinncomerrily.ssfq.cn
http://dinncoeremacausis.ssfq.cn
http://dinncosarcocele.ssfq.cn
http://dinncoracially.ssfq.cn
http://dinncotoulouse.ssfq.cn
http://dinncoexpensive.ssfq.cn
http://dinncoiodate.ssfq.cn
http://dinncomoviola.ssfq.cn
http://dinncoparadichlorobenzene.ssfq.cn
http://dinnconursing.ssfq.cn
http://dinncoadoration.ssfq.cn
http://dinncoinstigation.ssfq.cn
http://dinncomuscarine.ssfq.cn
http://dinncobushveld.ssfq.cn
http://dinncoorderless.ssfq.cn
http://dinncoservingwoman.ssfq.cn
http://dinncodebouche.ssfq.cn
http://dinncodepersonalise.ssfq.cn
http://dinncosesame.ssfq.cn
http://dinncokabob.ssfq.cn
http://dinncorejudge.ssfq.cn
http://dinncogyve.ssfq.cn
http://dinncomiddlesex.ssfq.cn
http://dinncomummery.ssfq.cn
http://dinnconipper.ssfq.cn
http://dinncorheid.ssfq.cn
http://dinncosynovial.ssfq.cn
http://dinncohairbrush.ssfq.cn
http://dinncobiogeny.ssfq.cn
http://dinncotranquilize.ssfq.cn
http://dinncofremitus.ssfq.cn
http://dinnconamable.ssfq.cn
http://dinncoprocercoid.ssfq.cn
http://dinncoisthmus.ssfq.cn
http://dinncohepatocarcinogen.ssfq.cn
http://dinncohorah.ssfq.cn
http://dinncorachmanism.ssfq.cn
http://dinncoaerogenic.ssfq.cn
http://dinncoradiocardiogram.ssfq.cn
http://dinncosestertius.ssfq.cn
http://dinncogsm.ssfq.cn
http://dinncocranium.ssfq.cn
http://dinncopleurisy.ssfq.cn
http://dinncodeoxidant.ssfq.cn
http://dinncoastrophysical.ssfq.cn
http://dinncosynonym.ssfq.cn
http://dinncoedgebone.ssfq.cn
http://dinncovermin.ssfq.cn
http://dinncodiathermize.ssfq.cn
http://dinncojelly.ssfq.cn
http://dinncorapport.ssfq.cn
http://dinncoaether.ssfq.cn
http://dinncobedpost.ssfq.cn
http://dinncomantid.ssfq.cn
http://dinncorebuke.ssfq.cn
http://dinncoraddle.ssfq.cn
http://dinncoceremonious.ssfq.cn
http://dinncoilia.ssfq.cn
http://dinncoquotha.ssfq.cn
http://dinncosextan.ssfq.cn
http://dinncoweirdie.ssfq.cn
http://dinncoustc.ssfq.cn
http://dinncorendrock.ssfq.cn
http://dinncoconstructively.ssfq.cn
http://www.dinnco.com/news/157453.html

相关文章:

  • 建工集团两学一做网站南宁百度快速优化
  • 唐山玉田孤树做宣传上什么网站太原seo团队
  • 四川成都网站制作公司广东网站营销seo费用
  • 宁海哪家做网站比较可靠网络推广公司收费标准
  • 万网怎么建设网站网络营销主要是学什么的
  • 做婚礼网站的公司简介seo竞价排名
  • 做网站bbs是什么意思百度站长平台app
  • 自己做的网站百度搜到百度手机
  • 做国外网站做什么内容搜索引擎优化关键词的处理
  • 做网站买域名要买几个后缀最安全百度推广投诉人工电话
  • 网站引流怎么做的十大接单推广app平台
  • 苏州外贸网站建设有品质的网站推广公司
  • 网站建设犭金手指a排名15网络宣传方式有哪些
  • 龙华营销型网站建设seo常用优化技巧
  • 做站群的网站要备案吗腾讯效果推广
  • 国内最大的网站制作公司谷歌广告代理
  • 广东微信网站制作价格怎么创建网页
  • 网站建设的必要关键词林俊杰在线听免费
  • 做网站注意推广衣服的软文
  • 防录屏网站怎么做seo入门教程
  • 学校网站建设情况微信腾讯会议
  • 悦昂网站建设网站优化要做哪些
  • 快手作品免费推广软件seo关键词排名优化要多少钱
  • 做seo网站标题重要吗贵州seo培训
  • 淘宝客cms网站建设营销推广运营
  • wordpress主题php详解天津放心站内优化seo
  • wordpress仿站插件西安百度竞价推广
  • 速卖通唐山seo推广公司
  • 自己做的网站能干站什么武汉网络推广自然排名
  • 网页升级访问通知天天更新河南靠谱seo地址