Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BaseBitmap draw off the area

    SDK Help
    0
    2
    193
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 14/05/2014 at 09:05, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      I have a little problem to draw lines into a BaseBitmap.

      When all the lines are inside the area, it's ok, but when there is one point out of the bitmap area, the line is not drawn.

      _<_img src="http://vonc.fr/temp/fc4d/zone.png" border="0" /_>_

      Is there a way to set a kind of clipping region for a basebitmap, to be able to draw lines who exceed the bitmap area ?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 14/05/2014 at 10:45, xxxxxxxx wrote:

        It's ok, I used the Cohen–Sutherland algorithm to make the clipping and it works fine !

        http://en.wikipedia.org/wiki/Cohen–Sutherland_algorithm

        For anyone who want ot use it : don't forget to use (Width - 1) and (Height - 1) for the size of the area in the algorythm, because it represent the max position pixel value (for 100 width, pixels X are 0 to 99).

        1 Reply Last reply Reply Quote 0
        • First post
          Last post