13. Effects and visualization objects

Source: Internet
Author: User
  1. Visualization object
    Visual class: If you want to build a program for drawing vector graphics, you can plan to create a canvas that contains thousands of shapes and can operate on these shapes separately, the element systems and shape classes that use WPF cannot meet the requirements. Instead, they must use lower-level visual classes with a higher level to manually perform rendering. Because the visual class is an abstract class and cannot create instances of this class, you need to use the derived class of the visual class. The most useful derived class is the drawingvisual class, which provides the ability to "Draw" the graphic content that you want to place in a visual object.
    To use the drawingvisual class to draw content, you need to call the renderopen () method, which returns a drawingcontext object used to define the visible content. After the painting is complete, you need to call the close () method, the following is the complete process of drawing a graph:
  2. Drawingvisual = new drawingvisual ();
    Drawingcontext Dc = drawingvisual. renderopen ();
    // Perform Drawing here.
    DC. Close ();
    Essentially, the drawingcontext class is composed of various methods that add some graphical details to a visual object. You can call these methods to draw various graphics, apply transformations, and change opacity, and list the methods of the drawingcontext class:

13. Effects and visualization objects

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.