If you can't read please download the document
Upload
stanislav-katsko
View
8.013
Download
15
Embed Size (px)
DESCRIPTION
Прикладная информатика
Citation preview
Attribution-ShareAlike (by-sa) stanislav.katsko.name Informatics.ssga.ru 2. 1. 3. , . :
4. ( Tcanvas)
5. Canvas( ). ( ) , , , . , , .
6. , , . WM_PAINT . OnPaint .
7. 1. OnPaint( Events ). 2. . 3. .
8. 2. 9. (Canvas ), TPaintBox System . TPaintBox OnPaint .
10. : ( Pen, TPen) ( Brush, TBrush) ( Font, TFont) void __fastcall TForm1::PaintBox1Paint (TObject*Sender) { PaintBox1->Canvas->Pen->Color = clGreen; PaintBox1->Canvas->Pen->Width = 3; PaintBox1->Canvas->Brush->Color = clRed; }
11. void __fastcall TForm1::PaintBox1Paint (TObject*Sender) { TRect tc; PaintBox1->Canvas->Pen->Color = clGreen; PaintBox1->Canvas->Pen->Width = 3; PaintBox1->Canvas->Brush->Color = clRed; rc.Left = 5; rc.Right = 100; rc.Top = 0; rc.Bottom = 50; PaintBox1->Canvas->Rectangle(rc); }
12. TextOut() PaintBox1->Canvas->TextOut (20,30,"!"); Font. PaintBox1->Canvas->Font->Color = clBlue; PaintBox1->Canvas->Font->Size = 14;
13. TBitmap( Graphics) (*.bmp). TImage Additional . Picture , TPicture. AutoSize .
14. 3. 15. (), . : 1. . 2. . 3. .
16. , . , .
17. , . - .
18. fon.bmp( ) () kolobok.bmp , . : () .
19. 1.1. . 1.2. . 1.3. b1 b2 ( TBitmap) . 1.4. . 1.5. ( TBitmap), b1 b2. LoadFromFile.
20. 2.1. OnPaint ( Events OnPaint . 2.2. Draw().
21. 3.1. . 5050. . . CopyMode cmSrcCopy b1.
22. 3.2. TRect ( b2, ) .
23. 3.3. TForm1 MaskBitmap . 3.4. b2. TBitmap b2. Assign() .
24. 3.5. . Mask(). , . , .
25. 3.6. FormPaint() . And. CopyMode.
26. 3.7. . CopyRect() . , , .
27. 3.8. . 3.9. () . , . .
28. 4.1. . 4.2. Interval 500 . 4.3. TTimer . 4.4. . KolF, , . .
29. 4.5. OnPaint ( ) KolF. 4.6. .
30. 4. 31. (TMediaPlayer) System . , Windows Media Player, .
32. , , Play(). ( Wait). MediaPlayer1->FileName = "song.mp3"; MediaPlayer1->Wait = false; MediaPlayer1->Play(); x=1; // .