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 # 。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This book is for software developers who have cursory knowledge of TDD and are looking to gain a thorough understanding of how TDD can benefit them and the applications they produce. Software developers with an intermediate understanding of C# and the .NET Framework and/or a thorough understanding of JavaScript and React will likely be able to follow along with all the code examples used throughout the book. The book covers everything from why TDD is important to setting up testing environments, and how to get started testing a green-field application. As the reader grows more comfortable, they will be exposed to more advanced TDD topics such as abstracting away third-party code, approaching a problem from a TDD perspective, and how to deal with legacy code that wasn't written with testability in mind. Chapter 1, Why TDD is Important, asks what is TDD and why should you care? In this chapter, you will learn what TDD is and why it matters. A compelling argument for TDD will be made and the benefits, and more importantly, the execution will be shown. Chapter 2, Setting Up the .NET Test Environment, explains how to set up your IDE and configure the testing framework so that you can easily run your tests in C# and .NET, with more detail and many more examples of growing complexity in the Speaker Meet API. Chapter 3, Setting Up a JavaScript Environment, configures the JavaScript testing framework so that you can easily run your tests in your IDE. It provides more detail and many more examples of growing complexity in the Speaker Meet React application. Chapter 4, What to Know Before Getting Started, dives deeper into the why and how of TDD. you will learn the importance of defining and testing boundaries and abstracting away third-party code (including the .NET Framework), and you'll discover more advanced concepts such as spies, mocks, and fakes, and how to avoid pitfalls along the way. Chapter 5, Tabula Rasa - Approaching an Application with TDD in Mind, explains how to get started with a new application. You'll apply what you've learned in the previous chapters and take the same approach with a full-sized application using Speaker Meet as an example. Chapter 6, Approaching the Problem, takes the broader problem of the overall application and breaks it into meaningful chunks that can be developed independently. You'll learn different approaches to developing an application, such as front to back, back to front, and inside out. Chapter 7, Test-Driving C# Applications, takes requirements and assembled user stories and turns them into working software using TDD. It explains how to utilize all the skills you've assembled so far to test the boundaries, testing small, individual units. Chapter 8, Abstract Away Problems, explores abstracting away third-party libraries, including the .NET Framework. It covers removing dependencies on things such as DateTime and Entity Framework. It explains how to decouple their application from specific implementations to not only allow your application to be testable but much more flexible and easy to modify in the future. Chapter 9, Testing JavaScript Applications, now that you have a working API, focuses on creating a Single Page Application in JavaScript using React. It focuses on test-driven actions and reducers and any functionality within the application. Chapter 10, Exploring Integrations, explains how to write integration tests to ensure that your application is functioning properly. Chapter 11, Changes in Requirements, focuses on what happens when the requirements change. What happens if a bug is discovered? No problem, change a test or write a new one to cover the new requirement or to defend against the discovered bug. Now, write some new code or change some existing code to make all of the new/modified tests pass. If you do everything correctly, you should feel safe to make these changes as your existing test suite will prevent you from introducing new bugs. Chapter 12, The Legacy Problem, explains that there are a lot of applications out there without sufficient (any?) test coverage, and even fewer were written testfirst. You'll discover some of the major problems with legacy applications that weren't written with testability in mind; they will be identified, and also how best to recover will be covered. Chapter 13, Unraveling a Mess, dives into how to go about safely modifying a legacy application that wasn't written with testing in mind. How can you add tests to minimize the potential for introducing new bugs when modifying the existing code? An extreme example will be used to explore these topics and more. Chapter 14, A Better Foot Forward, emphasizes that TDD is a personal choice. You don't need anyone's permission to do good work. Advice on how to continue a successful journey of TDD, how to introduce TDD to your team, and how to rejoin the world as a TDD expert will be covered in this chapter.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值