Practical C# Charts and Graphics

1、C# Graphics Basics

Visual C# provides all of the tools you need to create any type of graphics and charts. It supplies a GDI+ class library interface that  allows users to draw various graphics objects, including text, lines, rectangles, circles, ellipses, polygons, and  a host of other graphical shapes. This chapter begins by describing graphics coordinate systems used in Visual C#, and shows you several different coordinate systems you can use to make graphics programming easier. Then it will discuss two basic drawing objects, Pen and Brush, that are used to draw basic graphics shapes and fill enclosed surface with patterns, colors, or bitmaps. It will show you how to use  Pen and
Brush to create basic graphics shapes. Finally, it will explain the color system used in C# and discuss how to define the custom color map and shading.
Visual C #提供了所有的您需要創建任何類型的圖形和圖表工具。它提供了一個GDI +的類庫接口,允許用戶繪製各種圖形對象,包括文字, 線,矩形,圈,橢圓,多邊形,以及一系列其他的圖形形狀。本章首先描述用在Visual C #的圖形座標系統 ,併爲你顯示出幾個不同座標系統,你可以使用它使圖形編程更加容易。然後,將討論兩個基本繪圖對象,筆和刷子,用來提請基本圖形的形狀和填補封閉表面形態,顏色,或點陣圖。它會向你展示如何使用筆和

刷創建基本圖形的形狀。最後,它將解釋C #中的色彩系統的使用和如何確定自定義顏色和陰影地圖。

Coordinate Systems座標系

When creating a graphic object, you must determine where the graphic object or drawing will be displayed. To do that, you need to understand how Visual C# measures graphic object coordinates.
Each point on a Window Form or a control has an X and a Y coordinate. In the following sections,
we will discuss various coordinate systems and their relationships.
當創建一個圖形對象,您必須確定圖形對象或圖樣將在哪裏顯示。爲了做到這一點,你需要了解Visual C #度量圖形對象的座標。 在Windows窗體的每個點或控件有一個X和Y座標。以下各節中, 我們將討論不同的座標系及其相互關係。

Default Coordinates 默認座標

Visual C# and GDI+ graphics library have three default coordinate systems in 2D space: world,
page, and device. World coordinates are the coordinates used to model a particular graphic world
and are the coordinates you pass to methods in C#.
在Visual C #和GDI +的圖形庫中,二維空間中有三個預設座標系:世界, 網頁,和設備。世界座標系的座標模型用於某一特定的圖形世界並通過你的座標的方法在C # 。

 

發佈了52 篇原創文章 · 獲贊 4 · 訪問量 11萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章