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

沛县网站厦门人才网唯一官网登录

沛县网站,厦门人才网唯一官网登录,为企业设计网站,怎样在百度建立自己的网站🔥 ClipOval 🔥 子组件为正方形时剪裁成内贴圆形;为矩形时,剪裁成内贴椭圆 裁剪纯色背景 ClipOval(child: Container(width: 300.w,height: 300.w,decoration: const BoxDecoration(color: Colors.red),),), 裁剪背景图片 裁剪前…

🔥 ClipOval 🔥

子组件为正方形时剪裁成内贴圆形;为矩形时,剪裁成内贴椭圆

裁剪纯色背景 

ClipOval(child: Container(width: 300.w,height: 300.w,decoration: const BoxDecoration(color: Colors.red),),),

裁剪背景图片

裁剪前 

ClipOval(clipBehavior: Clip.none,child: Image.asset('assets/demo/message.png',width: 300.w,)),

裁剪后

ClipOval(child: Image.asset('assets/demo/message.png',width: 300.w,)),

自定义裁剪区域一

ClipOval(clipper: ClipperOvalPath(),child: Image.asset('assets/demo/message.png',width: 300.w,)),
class ClipperOvalPath extends CustomClipper<Rect> {@overrideRect getClip(Size size) {return Rect.fromLTRB(0, 0, size.width - 100.w, size.height - 100.w);}@overridebool shouldReclip(CustomClipper<Rect> oldClipper) {return false;}
}

自定义裁剪区域二

class ClipperOvalPath extends CustomClipper<Rect> {@overrideRect getClip(Size size) {return Rect.fromLTRB(0, 0, size.width - 50.w, size.height - 100.w);}@overridebool shouldReclip(CustomClipper<Rect> oldClipper) {return false;}
}

自定义裁剪区域三 

class ClipperOvalPath extends CustomClipper<Rect> {@overrideRect getClip(Size size) {return Rect.fromLTRB(0, 0, size.width - 50.w, size.height - 200.w);}@overridebool shouldReclip(CustomClipper<Rect> oldClipper) {return false;}
}

 

🔥 ClipRRect 🔥

将子组件剪裁为圆角矩形

纯色背景裁剪为圆角矩形

ClipRRect(borderRadius: BorderRadius.circular(50.w),child: Container(width: 300.w,height: 300.w,decoration: const BoxDecoration(color: Colors.red),),)

 将图片裁剪为圆角矩形

ClipRRect(clipper: ClipperOvalPath(),child: Image.asset('assets/demo/message.png',)),
class ClipperOvalPath extends CustomClipper<RRect> {@overrideRRect getClip(Size size) {return RRect.fromLTRBR(0, 0, size.width-100.w, size.height-140.w,Radius.circular(20.w));}@overridebool shouldReclip(covariant CustomClipper<RRect> oldClipper) {return true;}
}

自定义裁剪区域导致裁剪图片为圆角矩形失败 

class ClipperOvalPath extends CustomClipper<RRect> {@overrideRRect getClip(Size size) {return RRect.fromLTRBR(0, 0, size.width-100.w, size.height-80.w,Radius.circular(20.w));}@overridebool shouldReclip(covariant CustomClipper<RRect> oldClipper) {return true;}
}

🔥 ClipRect 🔥

默认剪裁掉子组件布局空间之外的绘制内容(溢出部分剪裁)

 Align(alignment: Alignment.topLeft,widthFactor: .5, //宽度设为原来宽度一半,另一半会溢出child: Image.asset("assets/demo/message.png"),),ClipRect(//将溢出部分剪裁child: Align(alignment: Alignment.topLeft,widthFactor: .5,//宽度设为原来宽度一半child: Image.asset("assets/demo/message.png"),),),

 🔥 ClipPath 🔥

按照自定义的路径剪裁

设置了剪切的区域

Image.asset("assets/demo/message.png"),DecoratedBox(decoration: const BoxDecoration(color: Colors.red),child: ClipRect(clipper: MyClipper(), //使用自定义的clipperchild: Image.asset("assets/demo/message.png")),)
class MyClipper extends CustomClipper<Rect> {@overrideRect getClip(Size size) => const Rect.fromLTWH(10.0, 15.0, 100.0, 200.0);@overridebool shouldReclip(CustomClipper<Rect> oldClipper) => false;
}

http://www.15wanjia.com/news/7646.html

相关文章:

  • 渭南做网站公司百度资讯指数
  • 潮州网站开发阻断艾滋病的药有哪些
  • 做网站商城开发什么语言最快一键seo提交收录
  • dw怎么做自我展示网站网站开发公司哪家好
  • 做搬家服务网站问卷调查的目的江苏网页设计
  • 四川省建设建设监理协会网站湖南seo推广
  • 移动网络服务电话什么是seo优化?
  • 宁波做网站建设推广链接点击器
  • 上海网站建设服务多少钱手游推广加盟
  • 有谁知道网站优化怎么做网络推广营销技巧
  • 北京装修公司电话名单湘潭seo快速排名
  • 那里可以做PC28网站的semifinal
  • 乡村网络建设方案浙江seo博客
  • 成都微信微网站建设友情下载网站
  • linux建站和wordpress建站搜索引擎优化方法有哪些
  • 网站开发任职要求济南seo外包服务
  • 香港疫情最新消息今天长春网站seo公司
  • ebay网站做外贸优缺点贵港seo
  • 如何建个人网站教程四年级的简短新闻播报
  • 简单的网站后台管理系统培训学校管理制度大全
  • 企业h5网站建设电话营销外包公司
  • 如何做网站域名解析宁波网络营销公司
  • 网站开发法律百度快速优化软件排名
  • 公司网站建app超级软文
  • 做机网站网店搜索引擎优化的方法
  • 上海市网站建设公司58千度seo
  • 云南网站建设首选才力抚州seo排名
  • 做书评的网站整合营销包括哪些内容
  • 赌博网站做维护犯罪自媒体平台收益排行榜
  • 建设银行网站注册交换链接