Metadata-Version: 1.0
Name: ninepatch
Version: 0.1.10
Summary: Slice and scale 9-patch images
Home-page: https://github.com/vindolin/ninepatch
Author: Thomas Schüßler
Author-email: vindolin@gmail.com
License: The MIT License (MIT)

Copyright (c) 2014 Thomas Schüßler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: Slice Android style 9-patch images into tiles and resize them into a scaled version
        -----------------------------------------------------------------------------------
        
        .. image:: https://travis-ci.org/vindolin/ninepatch.svg?branch=master
           :width: 90
           :alt: Travis CI
           :target: https://travis-ci.org/vindolin/ninepatch
        
        see https://developer.android.com/tools/help/draw9patch.html
        
        .. image:: https://raw.githubusercontent.com/vindolin/ninepatch/master/ninepatch/data/ninepatch_bubble.png
           :width: 320
           :alt: Example image
           :target: https://raw.githubusercontent.com/vindolin/ninepatch/master/ninepatch/data/ninepatch_bubble.png
        
        
        Python usage
        ------------
        .. code-block:: python
        
        
            from ninepatch import Ninepatch
            ninepatch = Ninepatch('9patch_test.png')
            print(ninepatch.fill_area)  # (left, top, right, bottom)
            scaled_image = ninepatch.render(500, 400) # creates a new PIL image
        
        Command line usage
        ------------------
        Your image must be a png image with a transparent background. The scale
        guide color must be 100% opaque black.
        
        open the scaled image in a viewer
        
        ::
        
            $ ninepatch 9patch_test.png 300 300
        
        save the scaled image to a new file
        
        ::
        
            $ ninepatch 9patch_test.png 300 300 scaled.png
        
        There's also a Tkinter viewer you can use to interactively preview your 9-patch images:
        
        ::
        
            $ ninepatch_viewer 9patch_test.png
        
        tk8.5-dev has to be installed before installing with pip.
        
        Ubuntu: sudo apt-get install tk8.5-dev
        
        You can reinstall with: "pip install -I ninepatch" after fixing this.
        
        
        Changelog
        ---------
        0.1.10
          * missing guides are now handled properly
        0.1.9
          * parse the fill area
          * switched to setuptools
        0.1.4
          * added Tkinter viewer
        
        Notes
        -----
        You can see the module in action in the ninepatch\_actor.py from my
        Clutter example project:
        https://github.com/vindolin/Clutter-Python-examples
        
        Issues
        ------
        ...
        
        TODO
        ----
        ...
        
Platform: UNKNOWN
