SlideShare a Scribd company logo
ЛАБОРАТОРНАЯ РАБОТА №1
Тема: «Фабрика Blockly»

Выполнила студентка гр.ПО-10а Ждан О.А.
РАБОТА С SVG ФАЙЛАМИ
ИСХОДНЫЙ ТЕКСТ SVG
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
<defs>
<radialGradient id="svg_36" spreadMethod="pad">
<stop stop-color="#ffff00" offset="0.88934"/>
<stop stop-color="#0000ff" offset="1"/>
</radialGradient>
</defs> <g>
<title>Layer 1</title>
<ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="143" cy="122" id="svg_49"/>
<ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="145" cy="117" id="svg_51"/>
<ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="150" cy="112" id="svg_52"/>
<ellipse fill="#FF0000" stroke="#000000" stroke-width="5" cx="-435" cy="-3" id="svg_1" rx="4"/>
<ellipse stroke="#000000" rx="1" id="svg_2" cy="-35" cx="-530" stroke-width="5" fill="#FF0000"/>
<ellipse ry="35" rx="35" id="svg_3" cy="47" cx="49" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="2" stroke="#000000" fill="#ffff00"/>
<line id="svg_4" y2="48" x2="15" y1="48" x1="47" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="2" stroke="#000000" fill="none"/>
<rect id="svg_6" height="0" width="3" y="37" x="27" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"/>
<text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="13" id="svg_7" y="71" x="47" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000"
fill="#000000"/>
<text transform="matrix(4.6 0 0 1.54018 -143.4 -3.63262)" stroke="#000000" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="12" id="svg_9" y="41.269232" x="38.565217" stroke-linecap="null"
stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" fill="#000000">r</text>

<line stroke="#000000" stroke-width="2" id="svg_10" y2="42" x2="24" y1="47" x1="15" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" fill="none"/>
<line stroke="#000000" stroke-width="2" id="svg_11" y2="54" x2="24" y1="48" x1="14" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" fill="none"/></g></svg>
МАСШТАБИРОВАНИЕ (100%, 120%, 160%)

100%
120%
160%
BLOCKLY
JAVA SCRIPT
<HTML>
<head>
<title>Circle</title>
</head>
<body>
<canvas id='circle55' width="1000" height="600" ></canvas>
<script>var ctx = document.getElementById('circle55').getContext('2d');
ctx.fillStyle = "yellow";
ctx.beginPath();
ctx.arc((80), (80), (80), 0, Math.PI * 2, true);
ctx.closePath();
ctx.fill();
</script></body>
</HTML>
РЕЗУЛЬТАТ

окружность, заданная центром и радиусом с
сплошной заливкой
БЛОК «DRAW CIRCLE»
Blockly.Language.webgl_a10_circle = {
category: 'WebGL 2d',
helpUrl: 'file:///C:/blockly/demos/webgl/webgl_a10_headerhtml5.help.html',
init: function() {
this.setColour(350);
this.appendDummyInput()
.appendTitle(new Blockly.FieldImage("../../media/circlee.svg", 100, 100))
.appendTitle("Draw circle with ");
this.appendValueInput("x")
.setCheck(Number)
.setAlign(Blockly.ALIGN_RIGHT)
.appendTitle("x");
this.appendValueInput("y")
.setCheck(Number)
.setAlign(Blockly.ALIGN_RIGHT)
.appendTitle("y");
this.appendValueInput("w")
.setCheck(Number)
.setAlign(Blockly.ALIGN_RIGHT)
.appendTitle("Radius r");
this.setPreviousStatement(true);

this.setNextStatement(true);
this.setTooltip('');
}
};Blockly.JavaScript.webgl_a10_circle = function() {
var value_canv_id = Blockly.JavaScript.valueToCode(this, 'canv_id', Blockly.JavaScript.ORDER_ATOMIC);
var value_x = Blockly.JavaScript.valueToCode(this, 'x', Blockly.JavaScript.ORDER_ATOMIC);
var value_y = Blockly.JavaScript.valueToCode(this, 'y', Blockly.JavaScript.ORDER_ATOMIC);
var value_w = Blockly.JavaScript.valueToCode(this, 'w', Blockly.JavaScript.ORDER_ATOMIC);
var code = "n&lt;script&gt;"
code+="var ctx = document.getElementById('"+canvas_name+"').getContext('2d');n"
code += 'ctx.fillStyle = "yellow";n';
code += 'ctx.beginPath();n';
code += 'ctx.arc('+ value_x+', ' + value_y+', '+value_w + ', 0, Math.PI * 2, true);n';
code += 'ctx.closePath();n';
code += 'ctx.fill();n';
code += "n&lt;/script&gt;";
return code;
};
СПАСИБО ЗА ВНИМАНИЕ

More Related Content

Viewers also liked

Commonly asked teacher interview questions
Commonly asked teacher interview questionsCommonly asked teacher interview questions
Commonly asked teacher interview questionsteachernew
 
4c Hair Chick Media Kit
4c Hair Chick Media Kit4c Hair Chick Media Kit
4c Hair Chick Media Kit4chairchick
 
Life of the people
Life of the peopleLife of the people
Life of the peopletcshistory
 
Ivailo dimitrov-2014
Ivailo dimitrov-2014Ivailo dimitrov-2014
Ivailo dimitrov-2014Sim Aleksiev
 
Бизнес почта
Бизнес почтаБизнес почта
Бизнес почта
Елена Кузовкина
 
NHTV presentation english nov14
NHTV presentation   english nov14NHTV presentation   english nov14
NHTV presentation english nov14
Nienke Dolfing
 
CFL Light Raw Material by Sandeep group-of-industries
CFL Light Raw Material by Sandeep group-of-industriesCFL Light Raw Material by Sandeep group-of-industries
CFL Light Raw Material by Sandeep group-of-industries
Sandeep Group of Industries
 
программа «пять ролей менеджера компании франчайзора
программа  «пять ролей менеджера компании  франчайзорапрограмма  «пять ролей менеджера компании  франчайзора
программа «пять ролей менеджера компании франчайзора
Елена Виль-Вильямс
 
Circulatory system
Circulatory system Circulatory system
Circulatory system lovely2111
 
Www.privat skifte.org
Www.privat skifte.orgWww.privat skifte.org
Www.privat skifte.org
Annamortensen
 
Solidarieta informatica febbraio 1.3
Solidarieta informatica febbraio 1.3Solidarieta informatica febbraio 1.3
Solidarieta informatica febbraio 1.3
Claudio Tancini
 
Newsletter 7 pdf
Newsletter 7 pdfNewsletter 7 pdf
Newsletter 7 pdfmaymaskow1
 
Steps to-heaven-2015.eng-1
Steps to-heaven-2015.eng-1Steps to-heaven-2015.eng-1
Steps to-heaven-2015.eng-1
Sim Aleksiev
 
Trabalhoredes
TrabalhoredesTrabalhoredes
Trabalhoredes
Kilder Silveira
 
Newsletter 6 pdf
Newsletter 6  pdfNewsletter 6  pdf
Newsletter 6 pdfmaymaskow1
 
Do ityoutube copy
Do ityoutube copyDo ityoutube copy
Do ityoutube copySalaroche
 
01teorias en pugna en las relaciones internacionales
01teorias en pugna en las relaciones internacionales01teorias en pugna en las relaciones internacionales
01teorias en pugna en las relaciones internacionales
Alexander Gonzales Cabana
 

Viewers also liked (20)

Commonly asked teacher interview questions
Commonly asked teacher interview questionsCommonly asked teacher interview questions
Commonly asked teacher interview questions
 
Metacognitive and cognitive estrategies
Metacognitive and cognitive estrategiesMetacognitive and cognitive estrategies
Metacognitive and cognitive estrategies
 
4c Hair Chick Media Kit
4c Hair Chick Media Kit4c Hair Chick Media Kit
4c Hair Chick Media Kit
 
Life of the people
Life of the peopleLife of the people
Life of the people
 
Ivailo dimitrov-2014
Ivailo dimitrov-2014Ivailo dimitrov-2014
Ivailo dimitrov-2014
 
Бизнес почта
Бизнес почтаБизнес почта
Бизнес почта
 
NHTV presentation english nov14
NHTV presentation   english nov14NHTV presentation   english nov14
NHTV presentation english nov14
 
CFL Light Raw Material by Sandeep group-of-industries
CFL Light Raw Material by Sandeep group-of-industriesCFL Light Raw Material by Sandeep group-of-industries
CFL Light Raw Material by Sandeep group-of-industries
 
программа «пять ролей менеджера компании франчайзора
программа  «пять ролей менеджера компании  франчайзорапрограмма  «пять ролей менеджера компании  франчайзора
программа «пять ролей менеджера компании франчайзора
 
Circulatory system
Circulatory system Circulatory system
Circulatory system
 
Www.privat skifte.org
Www.privat skifte.orgWww.privat skifte.org
Www.privat skifte.org
 
Solidarieta informatica febbraio 1.3
Solidarieta informatica febbraio 1.3Solidarieta informatica febbraio 1.3
Solidarieta informatica febbraio 1.3
 
Newsletter 7 pdf
Newsletter 7 pdfNewsletter 7 pdf
Newsletter 7 pdf
 
Steps to-heaven-2015.eng-1
Steps to-heaven-2015.eng-1Steps to-heaven-2015.eng-1
Steps to-heaven-2015.eng-1
 
Trabalhoredes
TrabalhoredesTrabalhoredes
Trabalhoredes
 
Newsletter 6 pdf
Newsletter 6  pdfNewsletter 6  pdf
Newsletter 6 pdf
 
Do ityoutube copy
Do ityoutube copyDo ityoutube copy
Do ityoutube copy
 
Cuestionario 4
Cuestionario 4Cuestionario 4
Cuestionario 4
 
Futbol
FutbolFutbol
Futbol
 
01teorias en pugna en las relaciones internacionales
01teorias en pugna en las relaciones internacionales01teorias en pugna en las relaciones internacionales
01teorias en pugna en las relaciones internacionales
 

Similar to Фабрика "Blockly" (исправлено)

HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در
Shiraz LUG
 
Лабораторная работа №1
Лабораторная работа №1Лабораторная работа №1
Лабораторная работа №1
Alexey Potopakhin
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)
Filip Van Laenen
 
Setting the Stage for SVG Animation
Setting the Stage for SVG AnimationSetting the Stage for SVG Animation
Setting the Stage for SVG Animation
James Nowland
 
лукьянченко л.а. пос 10а
лукьянченко л.а. пос 10алукьянченко л.а. пос 10а
лукьянченко л.а. пос 10а
l10bov
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
Jonathan Snook
 
Using SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better PlaceUsing SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better Place
Patrick Hund
 
MOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisMOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisBoris Zapolsky
 
Flash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXGFlash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXG
jmwhittaker
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
Oswald Campesato
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
Mike Wilcox
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first help
Dave Gardiner
 
Juan Pablo Acosta
Juan Pablo AcostaJuan Pablo Acosta
Juan Pablo Acostaguest7eb22f
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
Cloudinary
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibilityEb Styles
 

Similar to Фабрика "Blockly" (исправлено) (20)

Svg Basics
Svg BasicsSvg Basics
Svg Basics
 
фабрика Blockly
фабрика Blocklyфабрика Blockly
фабрика Blockly
 
SVG overview
SVG overviewSVG overview
SVG overview
 
HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در HTML 5 گرافیک دو بعدی در
HTML 5 گرافیک دو بعدی در
 
Лабораторная работа №1
Лабораторная работа №1Лабораторная работа №1
Лабораторная работа №1
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)
 
Setting the Stage for SVG Animation
Setting the Stage for SVG AnimationSetting the Stage for SVG Animation
Setting the Stage for SVG Animation
 
лукьянченко л.а. пос 10а
лукьянченко л.а. пос 10алукьянченко л.а. пос 10а
лукьянченко л.а. пос 10а
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Using SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better PlaceUsing SVG Graphics to Make the World Wide Web a Better Place
Using SVG Graphics to Make the World Wide Web a Better Place
 
MOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize thisMOConf'13: WebNotBombs: Optimize this
MOConf'13: WebNotBombs: Optimize this
 
Flash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXGFlash Camp - Degrafa & FXG
Flash Camp - Degrafa & FXG
 
SVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for BeginnersSVG, CSS3, and D3 for Beginners
SVG, CSS3, and D3 for Beginners
 
Thats Not Flash?
Thats Not Flash?Thats Not Flash?
Thats Not Flash?
 
STC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first helpSTC Summit 2015 Hypergraphics for visual-first help
STC Summit 2015 Hypergraphics for visual-first help
 
Juan Pablo Acosta
Juan Pablo AcostaJuan Pablo Acosta
Juan Pablo Acosta
 
Drawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the WebDrawing a Circle Three Ways: Generating Graphics for the Web
Drawing a Circle Three Ways: Generating Graphics for the Web
 
Web accessibility
Web accessibilityWeb accessibility
Web accessibility
 
SVG and the web
SVG and the webSVG and the web
SVG and the web
 
Css6 svg
Css6 svgCss6 svg
Css6 svg
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 

Фабрика "Blockly" (исправлено)

  • 1. ЛАБОРАТОРНАЯ РАБОТА №1 Тема: «Фабрика Blockly» Выполнила студентка гр.ПО-10а Ждан О.А.
  • 2. РАБОТА С SVG ФАЙЛАМИ
  • 3. ИСХОДНЫЙ ТЕКСТ SVG <svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"> <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ --> <defs> <radialGradient id="svg_36" spreadMethod="pad"> <stop stop-color="#ffff00" offset="0.88934"/> <stop stop-color="#0000ff" offset="1"/> </radialGradient> </defs> <g> <title>Layer 1</title> <ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="143" cy="122" id="svg_49"/> <ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="145" cy="117" id="svg_51"/> <ellipse fill="#000000" stroke="#000000" stroke-width="5" stroke-dasharray="null" stroke-linejoin="null" stroke-linecap="null" cx="150" cy="112" id="svg_52"/> <ellipse fill="#FF0000" stroke="#000000" stroke-width="5" cx="-435" cy="-3" id="svg_1" rx="4"/> <ellipse stroke="#000000" rx="1" id="svg_2" cy="-35" cx="-530" stroke-width="5" fill="#FF0000"/> <ellipse ry="35" rx="35" id="svg_3" cy="47" cx="49" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="2" stroke="#000000" fill="#ffff00"/> <line id="svg_4" y2="48" x2="15" y1="48" x1="47" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="2" stroke="#000000" fill="none"/> <rect id="svg_6" height="0" width="3" y="37" x="27" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"/> <text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="13" id="svg_7" y="71" x="47" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" stroke="#000000" fill="#000000"/> <text transform="matrix(4.6 0 0 1.54018 -143.4 -3.63262)" stroke="#000000" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="12" id="svg_9" y="41.269232" x="38.565217" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="0" fill="#000000">r</text> <line stroke="#000000" stroke-width="2" id="svg_10" y2="42" x2="24" y1="47" x1="15" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" fill="none"/> <line stroke="#000000" stroke-width="2" id="svg_11" y2="54" x2="24" y1="48" x1="14" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" fill="none"/></g></svg>
  • 6. JAVA SCRIPT <HTML> <head> <title>Circle</title> </head> <body> <canvas id='circle55' width="1000" height="600" ></canvas> <script>var ctx = document.getElementById('circle55').getContext('2d'); ctx.fillStyle = "yellow"; ctx.beginPath(); ctx.arc((80), (80), (80), 0, Math.PI * 2, true); ctx.closePath(); ctx.fill(); </script></body> </HTML>
  • 7. РЕЗУЛЬТАТ окружность, заданная центром и радиусом с сплошной заливкой
  • 8. БЛОК «DRAW CIRCLE» Blockly.Language.webgl_a10_circle = { category: 'WebGL 2d', helpUrl: 'file:///C:/blockly/demos/webgl/webgl_a10_headerhtml5.help.html', init: function() { this.setColour(350); this.appendDummyInput() .appendTitle(new Blockly.FieldImage("../../media/circlee.svg", 100, 100)) .appendTitle("Draw circle with "); this.appendValueInput("x") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("x"); this.appendValueInput("y") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("y"); this.appendValueInput("w") .setCheck(Number) .setAlign(Blockly.ALIGN_RIGHT) .appendTitle("Radius r"); this.setPreviousStatement(true); this.setNextStatement(true);
  • 9. this.setTooltip(''); } };Blockly.JavaScript.webgl_a10_circle = function() { var value_canv_id = Blockly.JavaScript.valueToCode(this, 'canv_id', Blockly.JavaScript.ORDER_ATOMIC); var value_x = Blockly.JavaScript.valueToCode(this, 'x', Blockly.JavaScript.ORDER_ATOMIC); var value_y = Blockly.JavaScript.valueToCode(this, 'y', Blockly.JavaScript.ORDER_ATOMIC); var value_w = Blockly.JavaScript.valueToCode(this, 'w', Blockly.JavaScript.ORDER_ATOMIC); var code = "n&lt;script&gt;" code+="var ctx = document.getElementById('"+canvas_name+"').getContext('2d');n" code += 'ctx.fillStyle = "yellow";n'; code += 'ctx.beginPath();n'; code += 'ctx.arc('+ value_x+', ' + value_y+', '+value_w + ', 0, Math.PI * 2, true);n'; code += 'ctx.closePath();n'; code += 'ctx.fill();n'; code += "n&lt;/script&gt;"; return code; };