1 РОБОТА З ГРАФІКОЮ Пашко Анатолій Олексійович Кафедра інформаційних систем і технологій Європейського університету

Slides:



Advertisements
Similar presentations
For(int i = 1; i
Advertisements

MS-Word XP Lesson 4.
Nov 2005 MSc Slide 1 - Another Example of a Structural Pattern Alternative way of adding Functionality to an existing class (alternative to a derived class)
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 2 2D Graphics: Basics.
Chapter 9 Color, Sound and Graphics
Naredba If..Then..Else... Procedure TForm1.Button1Click ( SEnder: Tobject ); Var x, y, Max : Integer; Begin x := StrToInt ( Edit1.Text ); y := StrToInt.
Tinaliah, S. Kom.. * * * * * * * * * * * * * * * * * #include using namespace std; void main () { for (int i = 1; i
#include int line_width = 1; void Display( void ) { glEnable( GL_LINE_STIPPLE ); glClearColor (0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT);
Creating a Histogram using the Histogram Function.
Computer Technology Timpview High School. Columns vs. Rows  Columns run vertically; rows runs horizontally  A cell is where a column and row meet.
C++ Graphics Primitives April 15th. void clearscreen(int c) –clear the screen to background color c –If c = 1 screen black.
Основи векторної графіки
Computer Graphics Prof. Muhammad Saeed. Drawing and Transformation of Figures in C# August 1,
1 Chapter 26 D&D – Graphics Outline 26.1 Introduction 26.3 Graphics Contexts and Graphics Objects 26.4 Color Control 26.5 Font Control 26.6 Drawing Lines,
Graphics in Android 1 Fall 2012 CS2302: Programming Principles.
CST238 Week 5 Questions / Concerns? Announcements – HW#1 due (Project ideas) – Check-off Take Home lab#4 Recap New topics – Drawing Coming up: – GUI Bloopers.
Object Oriented Programming Graphics and Multimedia Dr. Mike Spann
Chapter 18: Basic Spreadsheet Skills
Graphical User Interfaces Tonga Institute of Higher Education.
Работа с графикой в C++ Builder
This game made with EmanE Games Start the presentation to play the game Games emanegames.ga Release 3.
Font, Font Size, and Text Color. When you have a text box open you have access to the font, font size, and font color from the home screen under the section.
 2002 Prentice Hall. All rights reserved. 1 Outline Mouse Event Handling Keyboard Event Handling Graphical User Interface Concepts:
Graphics in Android 1 CS7030: Mobile App Development.
Midterm: Question 1 (35%) (30 minutes) Write an assembly program to draw a rectangle. – (5%) Show a message to ask for information of the rectangle – (5%)
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
Biosimilar (Insulin) – Competitive Landscape and Market & Pipeline Analysis, 2016 DelveInsight’s, “Biosimilar (Insulin) – Competitive Landscape and Market. Request for sample of this research report:
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Word 2010 Edit Page Layout In this lesson, you will learn how to insert columns and page breaks. How to change the page orientation, paper size, page margins,
1 Generating Random Numbers Textbook ch.6, pg
14 June بسم الله الرحمن الرحيم MT 262 Putting Computer Systems to Work Block IV: Applications Unit 1 : Introduction to Computer Graphics.
Area of a Triangle.
Choose a Count down Time by Clicking a Button Below.
Using/Modifying the visuals
Use this demo timeline to get acquainted or click New in the Office Timeline ribbon to build your own 1 Click the Milestone button and change Milestone.
Muybridge Lab CSD 340 (Blum).
How to fix and change around the font of Microsoft Word
. - t !!l t. - 1f1f J - /\/\ - ' I __.
Animated picture fades from gray to color (Basic)
CASE Tools Graphical User Interface Programming Using C#
Graphics in Android Fall 2012 CS2302: Programming Principles.
Detailing Your e-Campus Shell
Україніські народні інструменти.
C++ programming in Windows environment
Chapter 5, Conditionals Brief Notes
התוכנית הגראפית הראשונה
Insert 3D Models in Microsoft Word 2016
.. '.. ' 'i.., \. J'.....,....., ,., ,,.. '"'". ' · · f.. -··-·· '.,.. \...,., '.··.. ! f.f.
Adobe Photoshop Elements 2.0
class PrintOnetoTen { public static void main(String args[]) {
Click the floating action button to add or remove an item of the list.
Drawing Graphics in JavaScript
Object Oriented Programming
Web Service.
1 To go to the next slide, click this button instead. A random slide will come up.
2 types of scale factor problems
Using/Modifying the visuals
Click Summary Value Button to Show Source of Integral or Time
CLICK TO START.
HEADLINE GOES HERE. Directions to save header as JPEG:
3.Visual Basic Controls.
CLICK TO START.
Creating Controls Dynamically in C#
Color Box Button - Gray Type : object Type : object Type : object
Chapter 14 Drawing in a Window
Spell your name using word art from above
Slide Layout A preformatted slide layout that determines the placement of text and objects on the slide.
Call Now : Click : -
Call Now : Click : -
Call Now : Click : -
Presentation transcript:

1 РОБОТА З ГРАФІКОЮ Пашко Анатолій Олексійович Кафедра інформаційних систем і технологій Європейського університету

2 Графіка комп'ютерна -Векторна MoveTo(X,Y) LineTo(X,Y) -Растрова Pixels[x][y] -Фрактальна математичні перетворення

3 Загальний вигляд

4 Події Image

5

void __fastcall TSDIAppForm::Image1MouseDown (TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if (Button == mbLeft) { Image1->Canvas->Pen->Color=clRed; Image1->Canvas->Ellipse(X-2,Y-2,X+2,Y+2) ; } 6

7 Побудова точок

8

9

TColor a,b; a= clRed; b=clBlue; 10

TColor a; A=0x00 FF

12

13

void __fastcall TSDIAppForm::N7Click(TObject *Sender) { ColorDialog1->Execute(); a=ColorDialog1->Color; } 14

void __fastcall TSDIAppForm::Button1Click(TObject *Sender) { Image1->Canvas->Pen->Color=a; Image1->Canvas->Pen->Style=k; Image1->Canvas->MoveTo(x[0].x,x[0].y) ; Image1->Canvas->LineTo(x[1].x,x[1].y); } 15

16 Побудова ліній різного стилю

17 Побудова ліній різної товщини

18 Робота таймера

void __fastcall TSDIAppForm::Timer1Timer(TObject *Sender) { Image1->Canvas->Pen->Color=Image1->Canvas- >Pen->Color+rand()% ; Image1->Canvas->Ellipse(s1-10,s2-10,s1+10,s2+10) ; s1=s1+3*i1; s2=s2+6*i2; if (s1>Image1->Width-10) i1=i1*(-1); if(s2>Image1->Height-10) i2=i2*(-1); if (s1<10) i1=i1*(-1); if(s2<10) i2=i2*(-1); } 19

20 Відображення руху

void __fastcall TSDIAppForm::Timer1Timer(TObject *Sender) { Image1->Canvas->Pen->Color=clWhite; Image1->Canvas->Ellipse(s1-10,s2-10,s1+10,s2+10) ; s1=s1+3*i1; s2=s2+6*i2; if (s1>Image1->Width-10) i1=i1*(-1); if(s2>Image1->Height-10) i2=i2*(-1); if (s1<10) i1=i1*(-1); if(s2<10) i2=i2*(-1); Image1->Canvas->Pen->Color=rand()% ; Image1->Canvas->Ellipse(s1-10,s2-10,s1+10,s2+10) ; } 21