Page 225 - DCAP408_WEB_PROGRAMMING
P. 225

Unit 14: Text and Graphics Output




          underlying device context is released to Windows upon return from the call to your OnDraw  Notes
          function.
          CClientDC objects encapsulate working with a device context that represents only the client
          area of a window. The CClientDC constructor calls the GetDC function, and the destructor calls
          the ReleaseDC function. CWindowDC objects encapsulate a device context that represents the
          whole window, including its frame.



             Did u know?  CMetaFileDC objects encapsulate drawing into a Windows metafile.

               !
             Caution  In  contrast  to  the CPaintDC  passed to  OnDraw,  you  must  in  this case  call
             OnPrepareDC yourself.




              Task  Illustrate the function of CClientDC objects.

          Self Assessment

          Fill in the blanks:
          3.   A ......................... is a Windows data structure containing information about the drawing
               attributes of a device such as a display or a printer.
          4.   The ......................... constructor calls BeginPaint for you, and the destructor calls EndPaint.
          5.   CWindowDC objects encapsulate a device context  that represents  the whole  window,
               including its frame.

          14.3 Text Output

                       Text                               Output
             create_interactive_index   In a Textflow define some terms to be indexed and create a
                                      sorted index from the indexed terms.
             vertical_alignment_in_fitbox   Control the vertical alignment of text in the fitbox.
             keep_lines_together      Control the lines kept together on the page.
             drop_caps                Create an initial drop cap at the beginning of some text.
             distance_between_paragraphs   Control the distance between adjacent paragraphs.
             avoid_linebreaking       Create a Textflow and define various options for line breaking.
             bulleted_list            Output numbered and bulleted lists.
             continue_note_after_text   Insert a dot sequence automatically at the end of a textflow
                                      fitbox after the last word which can be showed together with
                                      the dots completely inside the fitbox.
             current_text_position    Demonstrate how the current text position can be used to
                                      output simple text, text lines, or Textflows next to one another.
             dot_leaders_with_tabs    Use leaders to fill the space defined by tabs between left-
                                      aligned and right-aligned text, such as in a table of contents.
             footnotes_in_text        Create footnotes (superscript text) in a Textflow provided with
                                      links to jump to the footnote text.
             image_as_text_fill_color   Create outline text and fill the interior of the glyphs with an  Contd...
                                      image.
             invisible_text           Output invisible text on top of an image.
             leaders_in_textline      Use dot leaders to fill the space between text and a page             219
                                           LOVELY PROFESSIONAL UNIVERSITY
                                      number such as in a table of contents.
             numbered_list            Output numbered lists with the numbers left- or right-aligned.
             process_utf8             Read text in the UTF-8 format and output it.
             rotated_text             Create text output which does not run  horizontally, but at
                                      some angle.
             shadowed_text            Create a shadowed text line with the shadow option of
                                      fit_textline.
             simple_stamp             Create a stamp across the page which runs diagonally from one
                                      edge to the other.
             starter_textflow         Create multi-column text output which may span multiple
                                      pages.
             starter_textline         Demonstrate various options for placing a text line.
             tabstops_in_text         Create a simple multi-column layout using tab stops.
             text_as_clipping_path    Output text filled with an image.
             text on a path           Create text on a path.
             text_on_color            Place a text line and a Textflow on a colored background.
             text_with_image_clipping_path   Use the clipping path from a TIFF or JPEG image to shape text
                                      output.
             transparent_part_of_text   Use gstate in Textflow, e.g. for transparency/opacity
             transparent_text         Create some transparent text.
             underlined_text          Create underlined text.
             weblink_in_text          Create a Textflow and integrate colorized Web links in the text.
             wrap_text_around_images   Place images within a Textflow.
             wrap_text_around_polygons   Use arbitrary polygons as wrapping shapes for text to wrap
                                      around.
   220   221   222   223   224   225   226   227   228   229   230