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

    GeUser Bitmaps

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 418 Views
    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 Offline
      Helper
      last edited by

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

      On 12/11/2012 at 02:02, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hi Folks,
       
      I've got a little GeUserArea drawing query. I can draw images into my area no troubles, but I can't seem to layer things up (like a PS image).
       
      If I load two images into my UA, and the second is positioned over the first one, they both display but the one on top with an alpha channel, is having it's alpha area filled with the pen colour, and not showing through to the first one.
       
      What do I need to be looking at here to give the second image that's overlayed onto the first one, a proper alpha effect?
       
      The flag BMP_ALLOWALPHA is being used.
       
      WP.

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

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

        On 17/11/2012 at 18:17, xxxxxxxx wrote:

        Little nudge... 😃
        I'm also trying to create a bitmap in it's own class. But I'm getting a C2248 error. Class layout below, with error codes underneath. How do I create a bitmap of it's own class?
         
        class MyImage : public BaseBitmap
        {
        protected:
         MyImage *BMP;
         public:
          static MyImage Alloc(void)
          {
          }
          static void Free(BaseBitmap*& bc)
          {
          }
          IMAGERESULT Init(LONG x, LONG y, LONG depth = 24, INITBITMAPFLAGS flags = INITBITMAPFLAGS_0)
          {
        x = 640;
        y = 380;
        return IMAGERESULT_OK;
          }
          Bool IsMultipassBitmap(void) const
          {
        return TRUE;
          }
        };
        ERROR: Error 2 error C2248: 'BaseBitmap::BaseBitmap' : cannot access private member declared in class 'BaseBitmap'
         
        I've tried variations of virtual void Free(BaseBitmap*& bc){} but nothing seems to be gel-ing.
         
        Kind regards,
         
        WP.

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

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

          On 19/11/2012 at 09:15, xxxxxxxx wrote:

          Hi,

          Why do you want to derive a class from BaseBitmap? I don't think BaseBitmap isn't designed to be inherited outside of the SDK. You would have to define also a custom allocation and free routine for it.

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

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

            On 19/11/2012 at 16:35, xxxxxxxx wrote:

            Hi Yannick,
             
            thanks for taking the time to have a look.
             
            While I was typing a response I was also playing around with the code and managed to get it to compile without errors or warnings. Consider that a newbie fluke! Although, it's not showing up in my userarea at the moment...!
             
            Re: classes... as I'm learning it was just something I did to try. I find it easier at the moment to have some elements in their own class and then bring that into the dialog layout (like userareas). Most likely my lack of knowledge/experience here, but I just find it easier to work with in regards to the coding itself. Though any tips/tricks/advice etc on this is most welcome 😃
             
            WP.

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

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

              On 19/11/2012 at 23:29, xxxxxxxx wrote:

              Instead of deriving from BaseBitmap, simply make your own non-derived (base) MyImage class and include a pointer member to a BaseBitmap that you allocate, use, and free with your MyImage class.  You can then use your Init() method to initialize the BaseBitmap in that way although less directly.

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