




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
ChapterIIPaintPotPartIDipyourfingerintoavirtualpaintpottodrawin
thatcolor.Dragyourfingeralongthescreentodrawaline.Pokethescreentomakedots.Usethebuttonatthebottomtowipethescreen
clean.Changethedotsizetolargeorsmallwiththe
buttonsatthebottom.Takeapicturewiththecameraandthendrawon
thatpicture.WiththePaintPotappyoucanUsingtheCanvascomponentfordrawing.Handlingtouchanddrageventsonthephone’ssurface.Controllingscreenlayoutwitharrangementcomponents.Usingeventhandlersthattakearguments.Definingvariablestorememberthingslikethedotsizetheuserhaschosenfordrawing.WhatYou’llLearnThenameyouchooseforyourprojectasyouworkonit.Thiswillalsobethenameoftheapplicationwhenyoupackageitforthephone.NotethatyoucanclickSaveAsintheComponentDesignertostartanewversionorrenameaproject.ThecomponentnameScreen1,whichyou’llseeinthepanelthatliststheapplication’scomponents.Youcan’tchangethisnameinthecurrentversionofAppInventor.Thetitleofthescreen,whichiswhatyou’llseeinthephone’stitlebar.ThisstartsoutbeingScreen1,whichiswhatyouusedinHelloPurr.Butyoucanchangeit,aswejustdidforPaintPot.TherearethreekeynamesinAppInventorUsingmoremeaningfulnamesmakesyourprojectsmorereadable,anditwillreallyhelpwhenyoumovetotheBlocksEditorandmustrefertothecomponentsbyname.Inthisbook,we’llusetheconventionofhavingthecomponentnameendwithitstype(forexample,
RedButton).UsemeaningfulnamesChapterIIPaintPotPartIIOntherightsideoftheDrawingCanvas.DrawCircleblock,you’llseefourslotsfortheargumentsweneedtofillin:x,y,andr.Andafillslot.Thexandyargumentsspecifythelocationwherethecircleshouldbedrawn,andrdeterminestheradius(orsize)ofthecircle.Ifthefillslotistrue,thenthecircleisvisible,ifisfalse,thecircleisinvisible.DrawingcircleAtouchiswhenyouplaceyourfingeronthecanvasandliftitwithoutmovingit.Adragiswhenyouplaceyourfingeronthecanvasandmoveitwhilekeepingitincontactwiththescreen.TouchOrDragOntherightsideoftheDrawingCanvas.DrawCircleblock,you’llseethreeslotsfortheargumentsweneedtofillin:x,y,andr.Thexandyargumentsspecifythelocationwherethecircleshouldbedrawn,andrdeterminestheradius(orsize)ofthecircle.DrawingLineOntherightsideoftheDrawingCanvas.DrawLineblock,you’llseefourslotsfortheargumentsweneedtofillin:x1,y1,x2,y2.Twoforeachpointthatdeterminestheline:(x1,y1)isonepoint,while(x2,y2)istheother.ChapterIIPaintPotPartIIIColorbuttonsAdding
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年智能可穿戴医疗器械市场趋势及行业应用场景分析报告
- 智能物流机器人研发与智能物流配送站应用可行性分析报告
- 环保型新材料在垃圾处理行业的应用及资金申请分析报告
- 工业互联网平台数据备份与恢复策略在2025年智能保险服务领域的应用前景分析报告
- 物业管理行业服务创新与增值业务拓展的市场前景分析报告2025
- 2025年咸宁“双碳”项目投资分析报告
- 2025-2030年中国烟气二氧化硫治理项目投资可行性研究分析报告
- 吉林省水溶肥料项目可行性分析报告-图文
- 杭州升降桌项目投资分析报告模板范本
- 2025-2030年中国真空进气过滤器行业深度研究分析报告
- (正式版)JTT 421-2024 港口固定式起重机安全要求
- 【中国信科-中信科移动】2023星地融合通信白皮书
- 脑电图判读异常脑电图
- 人体所需的七大营养素(卓越)
- 《小学生预防溺水安全教育班会》课件
- 传统园林技艺智慧树知到期末考试答案2024年
- 直播中的礼仪与形象塑造
- 2024年八年级数学下册期中检测卷【含答案】
- 老年人中医健康知识讲座总结
- 海南声茂羊和禽类半自动屠宰场项目环评报告
- 《民法典》合同编通则及司法解释培训课件
评论
0/150
提交评论