Advertisement
ZoriaRPG

bitmap plans

Aug 19th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.00 KB | None | 0 0
  1. In case anyone wants to comment, my plans for `*bitmap* in the future, are:
  2.  
  3. ```cpp
  4. *bitmap bmp-> Load(int target); //Loads a specific bitmap ID into the pointer.
  5.  
  6. *bitmap bmp-> LoadFile("filename"); //Loads a bitmap from a file.
  7.  
  8. *bitmap bmp-> Save("filename", int format); //Savesa bitmap to a file.
  9.  
  10. *bitmap bmp-> Create(int h, int w); //Creates a new user bitmap with specified dimensions.
  11.         //I'm not sure if I want to include a depth arg. Perhaps later, as CreateEx().
  12.  
  13. *bitmap bmp-> Destroy(); //Destroys the bitmap associated with the pointer.
  14.  
  15. // All screen drawing instructions.
  16. //e,g.
  17. *bitmap bmp-> Rectangle(...args); //Rectangle drawn to the bitmap loaded to this pointer.
  18.        //No need to set a render target.
  19.  
  20. *bitmap bmp-> BlitTo(bitmap dest); // Blits to a specified target. The screen would be -1.
  21.  
  22. *bitmap bmp-> BlitFrom(int src); //Blits a source bitmap to the pointer.
  23.  
  24. *bitmap bmp-> Resize(int h,int w, bool scale); //Resizes a bitmap. Creates a new bitmap, blits the
  25. //        current bitmap to it, destroys the old one and assigns the new one to the pointer.
  26.  
  27. int *bitmap bmp-> Width; //Read-only. Returns the width of the bitmap. May not be feasible.
  28.  
  29. int *bitmap bmp-> Height; //Read-only. Returns the height of the bitmap. May not be feasible.
  30.  
  31. int *bitmap bmp-> Depth ; //If I add depth, this would return it.
  32. //        May not be feasible on two accounts. (read-only)
  33.  
  34. *bitmap bmp-> Transform(int effect, int args[]); //Applies a rendering to the current bitmap.
  35.  
  36. *bitmap bmp-> RenderTo(target, mode, args[]); //Renders the bitmap associated with the pointer to
  37. //        another target bitmap, using an effect (e,g. QUAD), and args for the effect passed as an array..
  38.  
  39. *bitmap bmp-> RenderFrom(target, mode, args[]); //The same as the above, but a target bitmap is
  40. //        rendered to the pointer.
  41.  
  42. *bitmap bmp-> GrabScreen(bool subscreen); //Copies the current screen, all layers and objects,
  43.  //       including the subscreen, to the pointer.```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement