Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Drawing a bitmap inside a dialog

    SDK Help
    0
    33
    16.0k
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 17/02/2005 at 05:29, xxxxxxxx wrote:

      call your UserArea Draw function and call the member function DrawBitmap(...) to draw your image.

      See the example kuro posted

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 17/02/2005 at 06:20, xxxxxxxx wrote:

        Know what? Its not working yet. I just have to type:

          
        userx->Draw(0,0,81,81)  
        

        right?

        Isn't working 😞

        Rui Batista

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 17/02/2005 at 06:27, xxxxxxxx wrote:

          no, you have to do it like this:

          MyUserArea::Draw(x1,y1,x2,y2)  
          {  
               OffScreenOn();  
               SetClippingRegion(x1,y1,x2,y2);  
            
               DrawBitmap(your_bitmap, 0, 0, 81, 81, 0, 0, 81, 81, BMP_NORMAL);  
          }
          
          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 17/02/2005 at 06:31, xxxxxxxx wrote:

            I did, Samir. But I'm drawing it by calling userx->Draw(0,0,81,81); from inside my dialog routines. Or, how should I draw it?

            Rui Batista

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 17/02/2005 at 06:36, xxxxxxxx wrote:

              ? you don´t need to call it seperately. Once you call the Draw method as I posted it, it will be drawn. If you change the bitmap, all you need to do is redrawing the userarea with userx->Redraw();

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 17/02/2005 at 06:56, xxxxxxxx wrote:

                Well, the Draw method is never called. I placed a println in there and nothing is printed to the Console 😞
                Want me to send you the listing?

                Rui Batista

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 17/02/2005 at 07:00, xxxxxxxx wrote:

                  yeah, send it over.

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 17/02/2005 at 07:30, xxxxxxxx wrote:

                    Thank you. I just send it over to your mail 🙂

                    Rui Batista

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 17/02/2005 at 07:49, xxxxxxxx wrote:

                      Hey, you guys are having way to much fun without me! 🙂

                      Actually getting the GeUserArea to Draw() is the tricky part. As you can see by my code, I just 'force' a draw in the GeUserArea Init() method.

                      Let me know how it turns out.

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

                        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                        On 17/02/2005 at 14:11, xxxxxxxx wrote:

                        The code works as expected. It doesn´t seem to work for Rui on his MAC though. However, I assumed that the picture files he uses may be "unusable" (maybe due to unsupported compression types or similar). Rui wanted to check if other pic types do work for him. He´ll get back to us when he knows more. 🙂

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

                          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                          On 17/02/2005 at 14:25, xxxxxxxx wrote:

                          Gotcha. Here's hoping that it's unusable image formats and not something more sinister.

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

                            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                            On 18/02/2005 at 04:49, xxxxxxxx wrote:

                            Thank you very much Robert and Samir.
                            It was in fact the file format. I changed it to uncompressed tiff and is working now. I always thought that jpeg was fine but I guess I will go on using uncompressed tiff from now on.

                            Rui Batista

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