АвтоАвтоматизацияАрхитектураАстрономияАудитБиологияБухгалтерияВоенное делоГенетикаГеографияГеологияГосударствоДомДругоеЖурналистика и СМИИзобретательствоИностранные языкиИнформатикаИскусствоИсторияКомпьютерыКулинарияКультураЛексикологияЛитератураЛогикаМаркетингМатематикаМашиностроениеМедицинаМенеджментМеталлы и СваркаМеханикаМузыкаНаселениеОбразованиеОхрана безопасности жизниОхрана ТрудаПедагогикаПолитикаПравоПриборостроениеПрограммированиеПроизводствоПромышленностьПсихологияРадиоРегилияСвязьСоциологияСпортСтандартизацияСтроительствоТехнологииТорговляТуризмФизикаФизиологияФилософияФинансыХимияХозяйствоЦеннообразованиеЧерчениеЭкологияЭконометрикаЭкономикаЭлектроникаЮриспунденкция

Using Regions. Regions are often used for clipping and hit testing

Читайте также:
  1. B) Complete the letter using words and phrases from the Useful Language box. The letter in brackets indicates which column you should check to find the correct word or phrase.
  2. B) Translate into English using the above dialogue.
  3. Ex. 8. Express the same idea using the words and phrases from Ex. 4 instead of the underlined parts.
  4. Ex. 9. Complete the following sentences using the words and phrases from Ex.4 in their correct form.
  5. Ex.17 Look at the title of the Unit. Using your background knowledge write down a list of words related to the topic.
  6. Exercise 21 Match each function with the department responsible for it. Make sentences using expressions from the exercise above.
  7. Give English equivalents to the following words and word combinations using the text.
  8. IV. Translate these sentences into English using one of the Past Tenses.
  9. Paraphrase the underlined word combinations using the expressions from task 5 part 1.
  10. Point out countable nouns by using an indefinite article.
  11. Speak about the story of radio using the information from the text.
  12. Using a Gradient Brush to Fill Shapes

Regions are often used for clipping and hit testing. Clipping involves restricting drawing to a certain region of the display area, usually the portion that needs to be updated. Hit testing involves checking to determine whether the cursor is in a certain region of the screen when a mouse button is pressed.

You can construct a region from a rectangle or a path. You can also create complex regions by combining existing regions. The Region class provides the following methods for combining regions: Intersect, Union, Xor, Exclude, and Complement.

The intersection of two regions is the set of all points belonging to both regions. The union is the set of all points belonging to one or the other or both regions. The complement of a region is the set of all points that are not in the region. The following illustration shows the intersection and union of the two regions shown in the preceding illustration.

The Xor method, applied to a pair of regions, produces a region that contains all points that belong to one region or the other, but not both. The Exclude method, applied to a pair of regions, produces a region that contains all points in the first region that are not in the second region. The following illustration shows the regions that result from applying the Xor and Exclude methods to the two regions shown at the beginning of this topic.

To fill a region, you need a Graphics object, a Brush object, and a Region object. The Graphics object provides the FillRegion method, and the Brush object stores attributes of the fill, such as color or pattern. The following example fills a region with a solid color.

myGraphics.FillRegion(mySolidBrush, myRegion);

Области в GDI+

Область — это часть зоны, отображаемой устройством вывода. Области могут быть как простыми (один прямоугольник), так и сложными (набор многоугольников и замкнутых кривых). На приведенном ниже рисунке изображены две области: одна из них образована прямоугольником, а другая образована контуром.

ß-------


1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |

Поиск по сайту:



Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Студалл.Орг (0.003 сек.)