Results 1 to 3 of 3

Thread: Paint Tool

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Pakistan
    Posts
    229
    Answers
    10
    Vote Rating
    2
      0  

    Default Paint Tool

    I'm thinking of developing a MS Paint like tool in ExtJS and as I was up to planning of this tool, I got several questions.

    I know ExtJS can draw things inside a Component and they can be added as floating components to a Absolute layout container. They can be draggable and resizable.

    1. Now the question is if user wants to save the whole work in image formats (PNG, BMP, JPEG, GIF etc), how can a Absolute layout container do that? That's really not possible, right?

    2. What if user wants to zoom things out and in? He can do that with transform: scale(2) but that's CSS3 and there doesn't seem any cross compatible way of doing this. Right?

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585
    Vote Rating
    394
      0  

    Default

    Surely something like this would be done using the drawing package (Ext.draw.*) rather than using floating components?

    For exporting a drawing to an image file see:

    http://docs.sencha.com/ext-js/4-1/#!....ImageExporter

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Location
    Pakistan
    Posts
    229
    Answers
    10
    Vote Rating
    2
      0  

    Default

    The reason I was using floating components is because many of the functions are built into it.

    For example.

    component.toBack()
    component.toFront()
    draggable
    resizable
    etc

    If I draw everything on a single surface, I would need to write these functions myself. What do you say?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •