Announcement

Collapse
No announcement yet.

[Action Plugin] Draw Action Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Action Plugin] Draw Action Plugin

    Hi all!

    I've been idle for a long while, but I have been developing a new action plugin with a window control included for a while. This plugin allows you to perform 2D rendering and encoding / decoding images. It also allows you to draw directly onto an area on the window and have the end-user interact with your custom drawn graphics.

    You could, for example, create image editors with this plugin or even recreate ProgressEx in AMS Lua!



    Full Description
    Imagine Draw is an AMS Action plugin that will allow the developer to render 2D graphics onto images or a Canvas area on an AMS window. Outputs and images can be stored and loaded using several image formats.

    Draw will allow you to decode, encode and draw onto images. Draw has many supported formats, such as (Decoders): PNG, JPEG, JPEG2000, BMP, ICO, TIFF, TGA and (Encoders): PNG, JPEG, JPEG2000, BMP.

    Using Draw, you can generate any image you want. Included are tons of functions for rotation, mirroring, flipping, drawing lines, boxes, circles, ellipses, gradients, images onto images, arcs, polygons, bold lines, pies.

    All this can be done using blending modes, currently there are over 50 blending modes available in Draw. Aside from blending modes, a few filters have been added as well. These filters allow you to draw diagonal, horizontal and vertical lines in specific areas, to negate the colors in a specific area, darken and lighten colors and more!

    Draw also comes with functions to Load fonts, these allow you to preload an installed font and use them in your drawing code. You can draw text, angled text and determine the width and height calculated for a string of text you wish to draw.

    Draw supports many pixel formats, from 8 bits RGB to 32 bits RGBA. If you create a new image, you have to choose between 24 bits RGB, 32 bits RGB and 32 bits RGBA, but once you encode the image to file or buffer you can specify which pixel format to use.

    The submodule Color inside Draw allows you to work with colors, color calculation, conversion to hexadecimal strings, conversion from hexadecimal strings, gradient calculation, alpha blending or mixing two colors.

    The, previously developed by RizlaUK, Canvas plugin will also be a part of Draw. The completely redesigned Canvas object is ported with this version. The Canvas allows you to draw directly onto an Object in AMS using the same functions as the ones used for drawing onto images. The Canvas object also allows events, grabbing mouse and keyboard input and more!

    Functions
    Code:
    [LIST][*]DrawingImage.Export[*]DrawingImage.GetDC[*]DrawingImage.Free[*]DrawingImage.Save[*]DrawingImage.Mirror[*]DrawingImage.Copy[*]DrawingImage.FastRotate[*]DrawingImage.Resize[*]DrawingImage.New[*]DrawingImage.IsValid[*]DrawingImage.Draw[*]DrawingImage.FreeRotate[*]DrawingImage.GetOriginalFormat[*]DrawingImage.FreeExported[*]DrawingImage.GetHeight[*]DrawingImage.GetID[*]DrawingImage.GetWidth[*]DrawingImage.CopyRect[*]DrawingImage.GetDepth[*]DrawingImage.Load[*]DrawingImage.ExportedSize[/LIST][LIST][*]Canvas.Clear[*]Canvas.GetDC[*]Canvas.Free[*]Canvas.Draw[*]Canvas.Create[*]Canvas.SetCursor[*]Canvas.GrabImage[*]Canvas.RemoveCallback[*]Canvas.SetCallback[/LIST][LIST][*]Color.SetGreen[*]Color.RGBA[*]Color.SetAlpha[*]Color.RGBGradientColors[*]Color.GetBlue[*]Color.AlphaMix[*]Color.RGBToHex[*]Color.RGB[*]Color.GetAlpha[*]Color.SetBlue[*]Color.AlphaBlend[*]Color.RGBAToHex[*]Color.RGBAtOffset[*]Color.RGBAAtOffset[*]Color.HexToRGBA[*]Color.HexToRGB[*]Color.GetGreen[*]Color.RGBAGradientColors[*]Color.SetRed[*]Color.GetRed[/LIST][LIST][*]Drawing.DrawBoldLine[*]Drawing.PrepareEllipticalGradient[*]Drawing.PrepareRectangularGradient[*]Drawing.SetGradientColors[*]Drawing.ClearGradientColors[*]Drawing.GetTextHeight[*]Drawing.FillOutlinedRegion[*]Drawing.PrepareCircularGradient[*]Drawing.SetDrawingFont[*]Drawing.SetBackColor[*]Drawing.DrawLine[*]Drawing.GetTextWidth[*]Drawing.DrawRectangle[*]Drawing.PrepareConicalGradient[*]Drawing.DrawPixel[*]Drawing.DrawPolygon[*]Drawing.GrabCurrentOutput[*]Drawing.SetFrontColor[*]Drawing.SetFilteringMode[*]Drawing.DrawLineEx[*]Drawing.DrawPie[*]Drawing.DrawArc[*]Drawing.GetAvailableCollibFilters[*]Drawing.SetCollibFilter[*]Drawing.GetColorBuffer[*]Drawing.PrepareLinearGradient[*]Drawing.GetPixel[*]Drawing.SetSingleGradientColor[*]Drawing.DrawCircle[*]Drawing.DrawImage[*]Drawing.DrawRoundedRectangle[*]Drawing.DrawAlphaImage[*]Drawing.GetOutputInfo[*]Drawing.DrawEllipse[*]Drawing.DrawText[*]Drawing.DrawAngledText[/LIST][LIST][*]DrawingFont.GetID[*]DrawingFont.Load[*]DrawingFont.Free[/LIST]
    Pricing / downloads
    Considering this is a very large plugin with many features and even blending modes and other advanced drawing aids, this plugin will not be free. There is a trial version available, which shows some information to the end-user and exits the application within 5 minutes.

    The full version can be purchased from imagine-programming.com for just €5,-. Even though this was a lot of work, I still want it to be accessible for everyone. This price will eventually just pay for hosting fees and the time spent programming this plugin.

    Download / purchase and more info: http://www.imagine-programming.com/p...on-plugin.html
    Contact regarding licensing / downloads: http://www.imagine-programming.com/contact.html

    Thanks to Lekë for helping me test the plugin and inspire me with ideas for additions!
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

  • #2
    Looks very interesting, was just about to click the buy now button then wondered if it'll mess up my LH Compiler account as its the same email?

    Comment


    • #3
      Originally posted by Shrek View Post
      Looks very interesting, was just about to click the buy now button then wondered if it'll mess up my LH Compiler account as its the same email?
      Awesome! It won't mess anything up, this is a separate website and you'll get a new account on imagine-programming.com. Any future software you might purchase will then automatically be added to that account matching that email address! :yes
      Bas Groothedde
      Imagine Programming :: Blog

      AMS8 Plugins
      IMXLH Compiler

      Comment


      • #4
        got it, thanks :yes

        Comment


        • #5
          Originally posted by Shrek View Post
          got it, thanks :yes
          Thank you for the support! :yes
          Bas Groothedde
          Imagine Programming :: Blog

          AMS8 Plugins
          IMXLH Compiler

          Comment


          • #6
            does this plugin have any dependency upon software like microsoft framework o any O.S. limitation in graphical terms?

            Comment


            • #7
              Originally posted by naxo View Post
              does this plugin have any dependency upon software like microsoft framework o any O.S. limitation in graphical terms?
              This plugin depends on Windows, that's it. No .net required, not a specific library required, just a Windows installation with a graphical desktop interface (XP, Vista, 7, 8 etc).
              Bas Groothedde
              Imagine Programming :: Blog

              AMS8 Plugins
              IMXLH Compiler

              Comment


              • #8
                Update: v1.1.0.0
                Howdy people, a small Draw Action Plugin update.

                It's now possible to import a private font from file, without having to register it. This font can then be used in DrawingFont.Load or for any AMS object via SetProperties. The font is loaded during the session of the application, and will be freed when the application closes. Freeing the font manually is also possible with DrawingFont.FreePrivateFont.

                Another addition is Canvas.Focus, which will set the keyboard and mouse focus to the Canvas drawing area. This is particularly useful when your Canvas area expects keyboard input, but doesn't have focus after creation.

                I also added a small example showing how you can display animated sprites with Draw and a timer.

                Originally posted by imagine-programming.com
                • Added: DrawingFont.ImportPrivateFont
                • Added: DrawingFont.FreePrivateFont
                • Added: Canvas.Focus
                • Added: Canvas example displaying an animated sprite
                • Updated: Documentation
                Download or buy
                Draw Action Plugin
                Bas Groothedde
                Imagine Programming :: Blog

                AMS8 Plugins
                IMXLH Compiler

                Comment

                Working...
                X