'Advanced' Bitmap && Color methods

Quick question :

Would you guys say that I would be best to clone or dup the object for non destructive methods in both Bitmap and Color class'  ?
A bit out of topic. But it seems you still could call Kernel exit by calling

Kernel.exit
If you read the instructions for the REPL I wrote with Enelvon, you'd know that I explicitly mention having to either call Kernel.exit or raise a SystemExit exception manually when inside the context of an object with an alternative exit method defined. 😉


So yes, that's exactly what you have to do. And it's still obnoxious.


Also, Dekita, I generally opt for dup when performing non-destructive operations. You could technically use either, and clone is more complete (it copies frozen status and singleton methods / constants), but dup does everything you'd reasonably need to operate on a shallow copy.
I will stick with clone then. - Just in the event the singleton methods are required by potential users 🙂

Also - does this seem legit or have I missed something (again...)

#===============================================================================class Bitmap#===============================================================================  #-----------------------------------------------------------------------------  # Modified clone method to return self.  #-----------------------------------------------------------------------------  def clone    super    self  endendNone of my non destructive effects happen properly if I dont have this in place but i have the feeling I have overlooked something important again :/

Kind of get the feeling that returning self is undoing the clone...

Edit:

Same with dup..
string = 'hello'
class << string


def clone


super


self


end


end


string.clone.upcase! # => 'HELLO'


string # => 'HELLO'

I hope that makes it clear what the problem is.
Its not cloning it at all... Its changing the original.

Hmm...
At least it looks better than the unreadeable version at the status update.
Great script. Another thing that should have been build-in into RPG Maker Ace by default imo.

Basically, I am wondering if other script writers would actually use a script that offers such features?
Personally I try to avoid having to require other scripters scripts. Mostly because they don't allow me to share their scripts along with mine even though their scripts are totally free. So this would (for me) depend on the license.

It seems to be executed by the cpu instead of the gpu. So some of these methods should be called with caution (so not every frame) I suppose.
Oh yea. Most of these methods should be called one time only (for each time you wish to change the bitmap).

Also - the usage rights on the scripts are pretty much non existent. I have only requested that the header remains intact so people can see who has contributed to the script's methods 🙂

Just trying to catch up a little bit on workload and then this will be updated again and released for all to use/disregard 😀

Original thread: https://forums.rpgmakerweb.com/threads/advanced-bitmap-color-methods.29955/