[
  {
    "path": ".gitignore",
    "content": "build\npypotrace.egg-info\npotrace.egg-info\ndist\nMANIFEST\n*.cpp\n*.c\n*.pyc\n/.eggs\n.venv/\n.vscode/\n"
  },
  {
    "path": "CONTRIBUTORS",
    "content": "James Boyden: https://github.com/jboy\nKlonuo: https://github.com/klonuo\n"
  },
  {
    "path": "GPL",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "LICENSE",
    "content": "Python bindings for potrace\nCopyright (C) 2010 Luper ROUCH\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n"
  },
  {
    "path": "MANIFEST.in",
    "content": "include README.rst\ninclude LICENSE\ninclude GPL\ninclude MANIFEST.in\ninclude cysetuptools.py\nrecursive-include potrace *.py *.pyx *.pxd\nrecursive-exclude potrace *.c *.cpp\nrecursive-exclude tests *\n"
  },
  {
    "path": "README.rst",
    "content": "potrace Python bindings\n=======================\n\nThese bindings provide an object oriented API to the `potrace`_ library.\n\nThe full API documentation is on `<https://pythonhosted.org/pypotrace/>`_.\n\n\nExample usage\n-------------\n\nThe bindings work with input images represented as numpy arrays::\n\n    import numpy as np\n    import potrace\n\n    # Make a numpy array with a rectangle in the middle\n    data = np.zeros((32, 32), np.uint32)\n    data[8:32-8, 8:32-8] = 1\n\n    # Create a bitmap from the array\n    bmp = potrace.Bitmap(data)\n\n    # Trace the bitmap to a path\n    path = bmp.trace()\n\n    # Iterate over path curves\n    for curve in path:\n        print \"start_point =\", curve.start_point\n        for segment in curve:\n            print segment\n            end_point_x, end_point_y = segment.end_point\n            if segment.is_corner:\n                c_x, c_y = segment.c\n            else:\n                c1_x, c1_y = segment.c1\n                c2_x, c2_y = segment.c2\n\nInstallation\n------------\n\nUbuntu\n~~~~~~\n\nInstall system dependencies::\n\n    $ sudo apt-get install build-essential python-dev libagg-dev libpotrace-dev pkg-config\n\nInstall pypotrace::\n\n    $ git clone https://github.com/flupke/pypotrace.git\n    $ cd pypotrace\n    $ pip install numpy\n    $ pip install .\n\nCentOS/RedHat\n~~~~~~~~~~~~~\n\nInstall system dependencies::\n\n    $ sudo yum -y groupinstall \"Development Tools\"\n    $ sudo yum -y install agg-devel potrace-devel python-devel\n\nInstall pypotrace::\n\n    $ git clone https://github.com/flupke/pypotrace.git\n    $ cd pypotrace\n    $ pip install numpy\n    $ pip install .\n\nOSX\n~~~\n\nInstall system dependencies::\n\n    $ brew install libagg pkg-config potrace\n\nInstall pypotrace::\n\n    $ git clone https://github.com/flupke/pypotrace.git\n    $ cd pypotrace\n    $ pip install numpy\n    $ pip install .\n\nWindows\n~~~~~~~\n\n*Thanks to* `klonuo <https://github.com/klonuo>`_ *for the instructions*\n\nHere are instruction how to make this package work on Windows, by using MinGW\nsystem. Probably it can be done with Visual Studio, but I lack skills to make\nsuch magic.\n\nSo assuming user has MinGW available, additional two packages are needed:\n\n1. potrace source: http://potrace.sourceforge.net/#downloading\n2. agg source: http://www.antigrain.com/download/index.html\n\nI extracted both packages in my ``C:\\src`` folder. Both are easy to build by\nexecuting ``./configure; make`` and ``./autogen.sh; make`` respectively, on\nMSYS prompt.\n\nAfter that, we need some variables to build pypotrace successfully:\n\nFirst, includes paths:\n\n* \"numpy/arrayobject.h\": ``C:/Python27/Lib/site-packages/numpy/core/include``\n* potrace headers: ``C:/src/potrace-1.11/src``\n* agg headers: ``C:/src/agg-2.5``\n\nthere is a little catch for agg includes, as paths referenced in cpp sources\npoint to ``agg2/*.h`` while in downloaded agg package we don't have ``agg2``\nfolder. For me it was easiest to rename ``C:/src/agg-2.5/include`` to\n``C:/src/agg-2.5/agg2`` and use ``C:/src/agg-2.5`` as agg include folder.\n\nNext, libdirs for libraries we build above:\n\n* potrace: ``C:/src/potrace-1.11/src/.libs``\n* agg: ``C:/src/agg-2.5/src``\n\nand we can make pypotrace build command, and execute it::\n\n    python setup.py build_ext -IC:/Python27/Lib/site-packages/numpy/core/include;C:/src/potrace-1.11/src;C:/src/agg-2.5 -LC:/src/potrace-1.11/src/.libs;C:/src/agg-2.5/src\n\nFinally install the package::\n\n    C:\\src\\git\\pypotrace>python setup.py install\n    running install\n    running build\n    running build_py\n    copying potrace\\__init__.py -> build\\lib.win32-2.7\\potrace\n    copying potrace\\agg\\__init__.py -> build\\lib.win32-2.7\\potrace\\agg\n    running build_ext\n    skipping 'potrace\\_potrace.c' Cython extension (up-to-date)\n    skipping 'potrace\\bezier.cpp' Cython extension (up-to-date)\n    skipping 'potrace/agg\\curves.cpp' Cython extension (up-to-date)\n    running install_lib\n    creating C:\\Python27\\Lib\\site-packages\\potrace\n    creating C:\\Python27\\Lib\\site-packages\\potrace\\agg\n    copying build\\lib.win32-2.7\\potrace\\agg\\curves.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\\agg\n    copying build\\lib.win32-2.7\\potrace\\agg\\__init__.py -> C:\\Python27\\Lib\\site-packages\\potrace\\agg\n    copying build\\lib.win32-2.7\\potrace\\bezier.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\n    copying build\\lib.win32-2.7\\potrace\\_potrace.pyd -> C:\\Python27\\Lib\\site-packages\\potrace\n    copying build\\lib.win32-2.7\\potrace\\__init__.py -> C:\\Python27\\Lib\\site-packages\\potrace\n    byte-compiling C:\\Python27\\Lib\\site-packages\\potrace\\agg\\__init__.py to __init__.pyc\n    byte-compiling C:\\Python27\\Lib\\site-packages\\potrace\\__init__.py to __init__.pyc\n    running install_egg_info\n    Writing C:\\Python27\\Lib\\site-packages\\pypotrace-0.1-py2.7.egg-info\n\nRunning tests\n-------------\n\nYou can check everything is working correctly by running the tests::\n\n    $ pip install '.[dev]'\n    $ nosetests -v\n\nDocumentation\n-------------\n\nThe documentation is hosted here: http://packages.python.org/pypotrace\n\nA copy is also included in the ``doc/_build/html`` directory of the source\ndistribution.\n\nHomepage\n--------\n\nThis project is hosted on github: http://github.com/flupke/pypotrace\n\n.. _potrace: http://potrace.sourceforge.net/\n"
  },
  {
    "path": "build.py",
    "content": "import subprocess\nimport shlex\n\nfrom setuptools import Extension\nfrom Cython.Build import cythonize\n\nimport numpy as np\n\n\ndef pkg_config(pkg_name, command):\n    return subprocess.check_output([\"pkg-config\", command, pkg_name]).decode(\n        \"utf8\"\n    )\n\n\ndef build(setup_kwargs):\n    \"\"\"Needed for the poetry building interface.\"\"\"\n\n    extra_compile_args = pkg_config(\"libagg\", '--cflags')\n    extra_link_args = pkg_config(\"libagg\", '--libs')\n    extra_compile_args = shlex.split(extra_compile_args)\n    extra_link_args = shlex.split(extra_link_args)\n\n    print(extra_compile_args)\n    print(extra_link_args)\n\n    extensions = [\n        Extension(\n            \"potrace._potrace\",\n            sources=[\"potrace/_potrace.pyx\"],\n            include_dirs=[np.get_include()],\n            libraries=[\"potrace\"],\n        ),\n        Extension(\n            \"potrace.bezier\",\n            sources=[\"potrace/bezier.pyx\"],\n            include_dirs=[np.get_include()],\n            language=\"c++\",\n            extra_compile_args=extra_compile_args,\n            extra_link_args=extra_link_args,\n        ),\n        Extension(\n            \"potrace.agg.curves\",\n            sources=[\"potrace/agg/curves.pyx\"],\n            language=\"c++\",\n            extra_compile_args=extra_compile_args,\n            extra_link_args=extra_link_args,\n        ),\n    ]\n\n    extensions = cythonize(extensions)\n\n    setup_kwargs.update(\n        {\n            \"ext_modules\": extensions,\n            \"include_dirs\": [np.get_include()],\n        }\n    )\n"
  },
  {
    "path": "doc/Makefile",
    "content": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD   = sphinx-build\nPAPER         =\nBUILDDIR      = _build\n\n# Internal variables.\nPAPEROPT_a4     = -D latex_paper_size=a4\nPAPEROPT_letter = -D latex_paper_size=letter\nALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\n\n.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp epub latex changes linkcheck doctest\n\nhelp:\n\t@echo \"Please use \\`make <target>' where <target> is one of\"\n\t@echo \"  html       to make standalone HTML files\"\n\t@echo \"  dirhtml    to make HTML files named index.html in directories\"\n\t@echo \"  singlehtml to make a single large HTML file\"\n\t@echo \"  pickle     to make pickle files\"\n\t@echo \"  json       to make JSON files\"\n\t@echo \"  htmlhelp   to make HTML files and a HTML help project\"\n\t@echo \"  qthelp     to make HTML files and a qthelp project\"\n\t@echo \"  devhelp    to make HTML files and a Devhelp project\"\n\t@echo \"  epub       to make an epub\"\n\t@echo \"  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\"\n\t@echo \"  latexpdf   to make LaTeX files and run them through pdflatex\"\n\t@echo \"  changes    to make an overview of all changed/added/deprecated items\"\n\t@echo \"  linkcheck  to check all external links for integrity\"\n\t@echo \"  doctest    to run all doctests embedded in the documentation (if enabled)\"\n\nclean:\n\t-rm -rf $(BUILDDIR)/*\n\nhtml:\n\t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/html.\"\n\ndirhtml:\n\t$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\n\t@echo\n\t@echo \"Build finished. The HTML pages are in $(BUILDDIR)/dirhtml.\"\n\nsinglehtml:\n\t$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\n\t@echo\n\t@echo \"Build finished. The HTML page is in $(BUILDDIR)/singlehtml.\"\n\npickle:\n\t$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\n\t@echo\n\t@echo \"Build finished; now you can process the pickle files.\"\n\njson:\n\t$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\n\t@echo\n\t@echo \"Build finished; now you can process the JSON files.\"\n\nhtmlhelp:\n\t$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\n\t@echo\n\t@echo \"Build finished; now you can run HTML Help Workshop with the\" \\\n\t      \".hhp project file in $(BUILDDIR)/htmlhelp.\"\n\nqthelp:\n\t$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\n\t@echo\n\t@echo \"Build finished; now you can run \"qcollectiongenerator\" with the\" \\\n\t      \".qhcp project file in $(BUILDDIR)/qthelp, like this:\"\n\t@echo \"# qcollectiongenerator $(BUILDDIR)/qthelp/potrace.qhcp\"\n\t@echo \"To view the help file:\"\n\t@echo \"# assistant -collectionFile $(BUILDDIR)/qthelp/potrace.qhc\"\n\ndevhelp:\n\t$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) _build/devhelp\n\t@echo\n\t@echo \"Build finished.\"\n\t@echo \"To view the help file:\"\n\t@echo \"# mkdir -p $$HOME/.local/share/devhelp/potrace\"\n\t@echo \"# ln -s _build/devhelp $$HOME/.local/share/devhelp/potrace\"\n\t@echo \"# devhelp\"\n\nepub:\n\t$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\n\t@echo\n\t@echo \"Build finished. The epub file is in $(BUILDDIR)/epub.\"\n\nlatex:\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\n\t@echo\n\t@echo \"Build finished; the LaTeX files are in $(BUILDDIR)/latex.\"\n\t@echo \"Run \\`make all-pdf' or \\`make all-ps' in that directory to\" \\\n\t      \"run these through (pdf)latex.\"\n\nlatexpdf: latex\n\t$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex\n\t@echo \"Running LaTeX files through pdflatex...\"\n\tmake -C _build/latex all-pdf\n\t@echo \"pdflatex finished; the PDF files are in _build/latex.\"\n\nchanges:\n\t$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\n\t@echo\n\t@echo \"The overview file is in $(BUILDDIR)/changes.\"\n\nlinkcheck:\n\t$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\n\t@echo\n\t@echo \"Link check complete; look for any errors in the above output \" \\\n\t      \"or in $(BUILDDIR)/linkcheck/output.txt.\"\n\ndoctest:\n\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\n\t@echo \"Testing of doctests in the sources finished, look at the \" \\\n\t      \"results in $(BUILDDIR)/doctest/output.txt.\"\n"
  },
  {
    "path": "doc/_build/html/.buildinfo",
    "content": "# Sphinx build info version 1\n# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.\nconfig: df932b24544803dd899b353050e7ea2a\ntags: fbb0d17656682115ca4d033fb2f83ba1\n"
  },
  {
    "path": "doc/_build/html/_sources/index.txt",
    "content": "pypotrace documentation\n=======================\n\npypotrace are Python bindings for `potrace`_, an utility to transform bitmap\nimages into vector images.\n\n.. _potrace: http://potrace.sourceforge.net/\n\nContents:\n\n.. toctree::\n   :maxdepth: 2\n\n   tutorial\n   ref\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n\n"
  },
  {
    "path": "doc/_build/html/_sources/ref.txt",
    "content": ":mod:`potrace` -- API reference\n===============================\n\n.. module:: potrace\n\n.. autofunction:: potracelib_version\n\nConstants for :meth:`Bitmap.trace` *turnpolicy* parameter:\n\n.. data:: TURNPOLICY_BLACK\n.. data:: TURNPOLICY_WHITE\n.. data:: TURNPOLICY_LEFT\n.. data:: TURNPOLICY_RIGHT\n.. data:: TURNPOLICY_MINORITY\n.. data:: TURNPOLICY_MAJORITY\n.. data:: TURNPOLICY_RANDOM\n\n\nBitmap objects\n--------------\n\nYou start a trace by creating a :class:`Bitmap` instance, e.g.::\n\n    from potrace import Bitmap\n\n    # Initialize data, for example convert a PIL image to a numpy array\n    # [...]\n\n    bitmap = Bitmap(data)\n    path = bitmap.trace()\n\n.. autoclass:: Bitmap(data)\n   \n   .. automethod:: trace([turdsize, turnpolicy, alphamax, opticurve, opttolerance, progress_func])\n\n\nPath objects\n------------\n\n:meth:`Bitmap.trace` returns a :class:`Path` instance, containing the whole\nvectorized image.\n\n.. autoclass:: Path\n\n   .. attribute:: curves\n      \n      The list of :class:`Curve` objects composing the path.\n\n   .. attribute:: curves_tree\n\n      The top level :class:`Curve` objects in the tree representation of the\n      path.\n\n\nCurve objects\n-------------\n\n:class:`Path` objects are made of one or more of :class:`Curve` objects,\nwhich are themselves composed of a list of segments.\n\nCurves can have children curves. Children curves are guaranteed to be enclosed\nby their parent.\n\n.. autoclass:: Curve\n\n   .. attribute:: regular\n   .. attribute:: adaptive\n\n      Constants for the :meth:`tesselate` method.\n\n   .. autoattribute:: start_point\n\n   .. attribute:: segments\n\n      The list of segment objects that compose the curve.\n\n   .. attribute:: children\n\n      The list of children curves.\n\n   .. automethod:: tesselate([method, res])\n\nThere are two types of segments, :class:`BezierSegment`:\n\n.. image:: _static/bezier.png\n\nand :class:`CornerSegment`:\n\n.. image:: _static/corner.png\n\nSince curves are always closed, segments only store their control points and\nend point; their starting point is always the previous segment's end point. You\ncan check the :attr:`is_corner` attribute to determine the segments type easily.\n\n\n.. autoclass:: BezierSegment\n    \n   .. attribute:: c1\n\n      The segment's starting point control point.\n\n   .. attribute:: c2\n    \n      The segment's end point control point.\n\n   .. attribute:: end_point\n      \n      The segment's end point.\n\n   .. attribute:: is_corner\n\n      Always :const:`False`.\n\n\n.. autoclass:: CornerSegment\n\n   .. attribute:: c\n\n      The segment's corner point.\n\n   .. attribute:: end_point\n      \n      The segment's end point.\n\n   .. attribute:: is_corner\n\n      Always :const:`True`.\n"
  },
  {
    "path": "doc/_build/html/_sources/tutorial.txt",
    "content": "Tutorial\n========\n\n.. currentmodule:: potrace\n\nHere is a simple example using pypotrace::\n\n    import potrace\n\n    # Make a numpy array with a rectangle in the middle\n    data = np.zeros((32, 32), np.uint32)\n    data[8:32-8, 8:32-8] = 1\n\n    # Create a bitmap from the array\n    bmp = potrace.Bitmap(data)\n\n    # Trace the bitmap to a path\n    path = bmp.trace()\n    \n    # Iterate over path curves\n    for curve in path:\n        print \"start_point =\", curve.start_point\n        for segment in curve:\n            print segment\n            end_point_x, end_point_y = segment.end_point\n            if segment.is_corner:\n                c_x, c_y = segment.c\n            else:\n                c1_x, c1_y = segment.c1\n                c2_x, c2_y = segment.c2\n\n\nThe main class is :class:`Bitmap`. You pass its constructor a 2D numpy array,\nand you call its :meth:`trace() <Bitmap.trace>` method to convert it to a\n:class:`Path` object.\n"
  },
  {
    "path": "doc/_build/html/_static/basic.css",
    "content": "/*\n * basic.css\n * ~~~~~~~~~\n *\n * Sphinx stylesheet -- basic theme.\n *\n * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/* -- main layout ----------------------------------------------------------- */\n\ndiv.clearer {\n    clear: both;\n}\n\n/* -- relbar ---------------------------------------------------------------- */\n\ndiv.related {\n    width: 100%;\n    font-size: 90%;\n}\n\ndiv.related h3 {\n    display: none;\n}\n\ndiv.related ul {\n    margin: 0;\n    padding: 0 0 0 10px;\n    list-style: none;\n}\n\ndiv.related li {\n    display: inline;\n}\n\ndiv.related li.right {\n    float: right;\n    margin-right: 5px;\n}\n\n/* -- sidebar --------------------------------------------------------------- */\n\ndiv.sphinxsidebarwrapper {\n    padding: 10px 5px 0 10px;\n}\n\ndiv.sphinxsidebar {\n    float: left;\n    width: 230px;\n    margin-left: -100%;\n    font-size: 90%;\n}\n\ndiv.sphinxsidebar ul {\n    list-style: none;\n}\n\ndiv.sphinxsidebar ul ul,\ndiv.sphinxsidebar ul.want-points {\n    margin-left: 20px;\n    list-style: square;\n}\n\ndiv.sphinxsidebar ul ul {\n    margin-top: 0;\n    margin-bottom: 0;\n}\n\ndiv.sphinxsidebar form {\n    margin-top: 10px;\n}\n\ndiv.sphinxsidebar input {\n    border: 1px solid #98dbcc;\n    font-family: sans-serif;\n    font-size: 1em;\n}\n\nimg {\n    border: 0;\n}\n\n/* -- search page ----------------------------------------------------------- */\n\nul.search {\n    margin: 10px 0 0 20px;\n    padding: 0;\n}\n\nul.search li {\n    padding: 5px 0 5px 20px;\n    background-image: url(file.png);\n    background-repeat: no-repeat;\n    background-position: 0 7px;\n}\n\nul.search li a {\n    font-weight: bold;\n}\n\nul.search li div.context {\n    color: #888;\n    margin: 2px 0 0 30px;\n    text-align: left;\n}\n\nul.keywordmatches li.goodmatch a {\n    font-weight: bold;\n}\n\n/* -- index page ------------------------------------------------------------ */\n\ntable.contentstable {\n    width: 90%;\n}\n\ntable.contentstable p.biglink {\n    line-height: 150%;\n}\n\na.biglink {\n    font-size: 1.3em;\n}\n\nspan.linkdescr {\n    font-style: italic;\n    padding-top: 5px;\n    font-size: 90%;\n}\n\n/* -- general index --------------------------------------------------------- */\n\ntable.indextable {\n    width: 100%;\n}\n\ntable.indextable td {\n    text-align: left;\n    vertical-align: top;\n}\n\ntable.indextable dl, table.indextable dd {\n    margin-top: 0;\n    margin-bottom: 0;\n}\n\ntable.indextable tr.pcap {\n    height: 10px;\n}\n\ntable.indextable tr.cap {\n    margin-top: 10px;\n    background-color: #f2f2f2;\n}\n\nimg.toggler {\n    margin-right: 3px;\n    margin-top: 3px;\n    cursor: pointer;\n}\n\ndiv.modindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\ndiv.genindex-jumpbox {\n    border-top: 1px solid #ddd;\n    border-bottom: 1px solid #ddd;\n    margin: 1em 0 1em 0;\n    padding: 0.4em;\n}\n\n/* -- general body styles --------------------------------------------------- */\n\na.headerlink {\n    visibility: hidden;\n}\n\nh1:hover > a.headerlink,\nh2:hover > a.headerlink,\nh3:hover > a.headerlink,\nh4:hover > a.headerlink,\nh5:hover > a.headerlink,\nh6:hover > a.headerlink,\ndt:hover > a.headerlink {\n    visibility: visible;\n}\n\ndiv.body p.caption {\n    text-align: inherit;\n}\n\ndiv.body td {\n    text-align: left;\n}\n\n.field-list ul {\n    padding-left: 1em;\n}\n\n.first {\n    margin-top: 0 !important;\n}\n\np.rubric {\n    margin-top: 30px;\n    font-weight: bold;\n}\n\n/* -- sidebars -------------------------------------------------------------- */\n\ndiv.sidebar {\n    margin: 0 0 0.5em 1em;\n    border: 1px solid #ddb;\n    padding: 7px 7px 0 7px;\n    background-color: #ffe;\n    width: 40%;\n    float: right;\n}\n\np.sidebar-title {\n    font-weight: bold;\n}\n\n/* -- topics ---------------------------------------------------------------- */\n\ndiv.topic {\n    border: 1px solid #ccc;\n    padding: 7px 7px 0 7px;\n    margin: 10px 0 10px 0;\n}\n\np.topic-title {\n    font-size: 1.1em;\n    font-weight: bold;\n    margin-top: 10px;\n}\n\n/* -- admonitions ----------------------------------------------------------- */\n\ndiv.admonition {\n    margin-top: 10px;\n    margin-bottom: 10px;\n    padding: 7px;\n}\n\ndiv.admonition dt {\n    font-weight: bold;\n}\n\ndiv.admonition dl {\n    margin-bottom: 0;\n}\n\np.admonition-title {\n    margin: 0px 10px 5px 0px;\n    font-weight: bold;\n}\n\ndiv.body p.centered {\n    text-align: center;\n    margin-top: 25px;\n}\n\n/* -- tables ---------------------------------------------------------------- */\n\ntable.docutils {\n    border: 0;\n    border-collapse: collapse;\n}\n\ntable.docutils td, table.docutils th {\n    padding: 1px 8px 1px 5px;\n    border-top: 0;\n    border-left: 0;\n    border-right: 0;\n    border-bottom: 1px solid #aaa;\n}\n\ntable.field-list td, table.field-list th {\n    border: 0 !important;\n}\n\ntable.footnote td, table.footnote th {\n    border: 0 !important;\n}\n\nth {\n    text-align: left;\n    padding-right: 5px;\n}\n\n/* -- other body styles ----------------------------------------------------- */\n\ndl {\n    margin-bottom: 15px;\n}\n\ndd p {\n    margin-top: 0px;\n}\n\ndd ul, dd table {\n    margin-bottom: 10px;\n}\n\ndd {\n    margin-top: 3px;\n    margin-bottom: 10px;\n    margin-left: 30px;\n}\n\ndt:target, .highlight {\n    background-color: #fbe54e;\n}\n\ndl.glossary dt {\n    font-weight: bold;\n    font-size: 1.1em;\n}\n\n.field-list ul {\n    margin: 0;\n    padding-left: 1em;\n}\n\n.field-list p {\n    margin: 0;\n}\n\n.refcount {\n    color: #060;\n}\n\n.optional {\n    font-size: 1.3em;\n}\n\n.versionmodified {\n    font-style: italic;\n}\n\n.system-message {\n    background-color: #fda;\n    padding: 5px;\n    border: 3px solid red;\n}\n\n.footnote:target  {\n    background-color: #ffa\n}\n\n.line-block {\n    display: block;\n    margin-top: 1em;\n    margin-bottom: 1em;\n}\n\n.line-block .line-block {\n    margin-top: 0;\n    margin-bottom: 0;\n    margin-left: 1.5em;\n}\n\n/* -- code displays --------------------------------------------------------- */\n\npre {\n    overflow: auto;\n}\n\ntd.linenos pre {\n    padding: 5px 0px;\n    border: 0;\n    background-color: transparent;\n    color: #aaa;\n}\n\ntable.highlighttable {\n    margin-left: 0.5em;\n}\n\ntable.highlighttable td {\n    padding: 0 0.5em 0 0.5em;\n}\n\ntt.descname {\n    background-color: transparent;\n    font-weight: bold;\n    font-size: 1.2em;\n}\n\ntt.descclassname {\n    background-color: transparent;\n}\n\ntt.xref, a tt {\n    background-color: transparent;\n    font-weight: bold;\n}\n\nh1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {\n    background-color: transparent;\n}\n\n/* -- math display ---------------------------------------------------------- */\n\nimg.math {\n    vertical-align: middle;\n}\n\ndiv.body div.math p {\n    text-align: center;\n}\n\nspan.eqno {\n    float: right;\n}\n\n/* -- printout stylesheet --------------------------------------------------- */\n\n@media print {\n    div.document,\n    div.documentwrapper,\n    div.bodywrapper {\n        margin: 0 !important;\n        width: 100%;\n    }\n\n    div.sphinxsidebar,\n    div.related,\n    div.footer,\n    #top-link {\n        display: none;\n    }\n}\n"
  },
  {
    "path": "doc/_build/html/_static/default.css",
    "content": "/*\n * default.css_t\n * ~~~~~~~~~~~~~\n *\n * Sphinx stylesheet -- default theme.\n *\n * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n@import url(\"basic.css\");\n\n/* -- page layout ----------------------------------------------------------- */\n\nbody {\n    font-family: sans-serif;\n    font-size: 100%;\n    background-color: #11303d;\n    color: #000;\n    margin: 0;\n    padding: 0;\n}\n\ndiv.document {\n    background-color: #1c4e63;\n}\n\ndiv.documentwrapper {\n    float: left;\n    width: 100%;\n}\n\ndiv.bodywrapper {\n    margin: 0 0 0 230px;\n}\n\ndiv.body {\n    background-color: #ffffff;\n    color: #000000;\n    padding: 0 20px 30px 20px;\n}\n\ndiv.footer {\n    color: #ffffff;\n    width: 100%;\n    padding: 9px 0 9px 0;\n    text-align: center;\n    font-size: 75%;\n}\n\ndiv.footer a {\n    color: #ffffff;\n    text-decoration: underline;\n}\n\ndiv.related {\n    background-color: #133f52;\n    line-height: 30px;\n    color: #ffffff;\n}\n\ndiv.related a {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar {\n}\n\ndiv.sphinxsidebar h3 {\n    font-family: 'Trebuchet MS', sans-serif;\n    color: #ffffff;\n    font-size: 1.4em;\n    font-weight: normal;\n    margin: 0;\n    padding: 0;\n}\n\ndiv.sphinxsidebar h3 a {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar h4 {\n    font-family: 'Trebuchet MS', sans-serif;\n    color: #ffffff;\n    font-size: 1.3em;\n    font-weight: normal;\n    margin: 5px 0 0 0;\n    padding: 0;\n}\n\ndiv.sphinxsidebar p {\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar p.topless {\n    margin: 5px 10px 10px 10px;\n}\n\ndiv.sphinxsidebar ul {\n    margin: 10px;\n    padding: 0;\n    color: #ffffff;\n}\n\ndiv.sphinxsidebar a {\n    color: #98dbcc;\n}\n\ndiv.sphinxsidebar input {\n    border: 1px solid #98dbcc;\n    font-family: sans-serif;\n    font-size: 1em;\n}\n\n/* -- body styles ----------------------------------------------------------- */\n\na {\n    color: #355f7c;\n    text-decoration: none;\n}\n\na:visited {\n    color: #355f7c;\n    text-decoration: none;\n}\n\na:hover {\n    text-decoration: underline;\n}\n\ndiv.body p, div.body dd, div.body li {\n    text-align: justify;\n    line-height: 130%;\n}\n\ndiv.body h1,\ndiv.body h2,\ndiv.body h3,\ndiv.body h4,\ndiv.body h5,\ndiv.body h6 {\n    font-family: 'Trebuchet MS', sans-serif;\n    background-color: #f2f2f2;\n    font-weight: normal;\n    color: #20435c;\n    border-bottom: 1px solid #ccc;\n    margin: 20px -20px 10px -20px;\n    padding: 3px 0 3px 10px;\n}\n\ndiv.body h1 { margin-top: 0; font-size: 200%; }\ndiv.body h2 { font-size: 160%; }\ndiv.body h3 { font-size: 140%; }\ndiv.body h4 { font-size: 120%; }\ndiv.body h5 { font-size: 110%; }\ndiv.body h6 { font-size: 100%; }\n\na.headerlink {\n    color: #c60f0f;\n    font-size: 0.8em;\n    padding: 0 4px 0 4px;\n    text-decoration: none;\n}\n\na.headerlink:hover {\n    background-color: #c60f0f;\n    color: white;\n}\n\ndiv.body p, div.body dd, div.body li {\n    text-align: justify;\n    line-height: 130%;\n}\n\ndiv.admonition p.admonition-title + p {\n    display: inline;\n}\n\ndiv.admonition p {\n    margin-bottom: 5px;\n}\n\ndiv.admonition pre {\n    margin-bottom: 5px;\n}\n\ndiv.admonition ul, div.admonition ol {\n    margin-bottom: 5px;\n}\n\ndiv.note {\n    background-color: #eee;\n    border: 1px solid #ccc;\n}\n\ndiv.seealso {\n    background-color: #ffc;\n    border: 1px solid #ff6;\n}\n\ndiv.topic {\n    background-color: #eee;\n}\n\ndiv.warning {\n    background-color: #ffe4e4;\n    border: 1px solid #f66;\n}\n\np.admonition-title {\n    display: inline;\n}\n\np.admonition-title:after {\n    content: \":\";\n}\n\npre {\n    padding: 5px;\n    background-color: #eeffcc;\n    color: #333333;\n    line-height: 120%;\n    border: 1px solid #ac9;\n    border-left: none;\n    border-right: none;\n}\n\ntt {\n    background-color: #ecf0f3;\n    padding: 0 1px 0 1px;\n    font-size: 0.95em;\n}\n\nth {\n    background-color: #ede;\n}\n\n.warning tt {\n    background: #efc2c2;\n}\n\n.note tt {\n    background: #d6d6d6;\n}"
  },
  {
    "path": "doc/_build/html/_static/doctools.js",
    "content": "/*\n * doctools.js\n * ~~~~~~~~~~~\n *\n * Sphinx JavaScript utilties for all documentation.\n *\n * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/**\n * select a different prefix for underscore\n */\n$u = _.noConflict();\n\n/**\n * make the code below compatible with browsers without\n * an installed firebug like debugger\n */\nif (!window.console || !console.firebug) {\n  var names = [\"log\", \"debug\", \"info\", \"warn\", \"error\", \"assert\", \"dir\", \"dirxml\",\n      \"group\", \"groupEnd\", \"time\", \"timeEnd\", \"count\", \"trace\", \"profile\", \"profileEnd\"];\n  window.console = {};\n  for (var i = 0; i < names.length; ++i)\n    window.console[names[i]] = function() {};\n}\n\n/**\n * small helper function to urldecode strings\n */\njQuery.urldecode = function(x) {\n  return decodeURIComponent(x).replace(/\\+/g, ' ');\n}\n\n/**\n * small helper function to urlencode strings\n */\njQuery.urlencode = encodeURIComponent;\n\n/**\n * This function returns the parsed url parameters of the\n * current request. Multiple values per key are supported,\n * it will always return arrays of strings for the value parts.\n */\njQuery.getQueryParameters = function(s) {\n  if (typeof s == 'undefined')\n    s = document.location.search;\n  var parts = s.substr(s.indexOf('?') + 1).split('&');\n  var result = {};\n  for (var i = 0; i < parts.length; i++) {\n    var tmp = parts[i].split('=', 2);\n    var key = jQuery.urldecode(tmp[0]);\n    var value = jQuery.urldecode(tmp[1]);\n    if (key in result)\n      result[key].push(value);\n    else\n      result[key] = [value];\n  }\n  return result;\n};\n\n/**\n * small function to check if an array contains\n * a given item.\n */\njQuery.contains = function(arr, item) {\n  for (var i = 0; i < arr.length; i++) {\n    if (arr[i] == item)\n      return true;\n  }\n  return false;\n};\n\n/**\n * highlight a given string on a jquery object by wrapping it in\n * span elements with the given class name.\n */\njQuery.fn.highlightText = function(text, className) {\n  function highlight(node) {\n    if (node.nodeType == 3) {\n      var val = node.nodeValue;\n      var pos = val.toLowerCase().indexOf(text);\n      if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {\n        var span = document.createElement(\"span\");\n        span.className = className;\n        span.appendChild(document.createTextNode(val.substr(pos, text.length)));\n        node.parentNode.insertBefore(span, node.parentNode.insertBefore(\n          document.createTextNode(val.substr(pos + text.length)),\n          node.nextSibling));\n        node.nodeValue = val.substr(0, pos);\n      }\n    }\n    else if (!jQuery(node).is(\"button, select, textarea\")) {\n      jQuery.each(node.childNodes, function() {\n        highlight(this);\n      });\n    }\n  }\n  return this.each(function() {\n    highlight(this);\n  });\n};\n\n/**\n * Small JavaScript module for the documentation.\n */\nvar Documentation = {\n\n  init : function() {\n    this.fixFirefoxAnchorBug();\n    this.highlightSearchWords();\n    this.initModIndex();\n  },\n\n  /**\n   * i18n support\n   */\n  TRANSLATIONS : {},\n  PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },\n  LOCALE : 'unknown',\n\n  // gettext and ngettext don't access this so that the functions\n  // can savely bound to a different name (_ = Documentation.gettext)\n  gettext : function(string) {\n    var translated = Documentation.TRANSLATIONS[string];\n    if (typeof translated == 'undefined')\n      return string;\n    return (typeof translated == 'string') ? translated : translated[0];\n  },\n\n  ngettext : function(singular, plural, n) {\n    var translated = Documentation.TRANSLATIONS[singular];\n    if (typeof translated == 'undefined')\n      return (n == 1) ? singular : plural;\n    return translated[Documentation.PLURALEXPR(n)];\n  },\n\n  addTranslations : function(catalog) {\n    for (var key in catalog.messages)\n      this.TRANSLATIONS[key] = catalog.messages[key];\n    this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');\n    this.LOCALE = catalog.locale;\n  },\n\n  /**\n   * add context elements like header anchor links\n   */\n  addContextElements : function() {\n    $('div[id] > :header:first').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this headline')).\n      appendTo(this);\n    });\n    $('dt[id]').each(function() {\n      $('<a class=\"headerlink\">\\u00B6</a>').\n      attr('href', '#' + this.id).\n      attr('title', _('Permalink to this definition')).\n      appendTo(this);\n    });\n  },\n\n  /**\n   * workaround a firefox stupidity\n   */\n  fixFirefoxAnchorBug : function() {\n    if (document.location.hash && $.browser.mozilla)\n      window.setTimeout(function() {\n        document.location.href += '';\n      }, 10);\n  },\n\n  /**\n   * highlight the search words provided in the url in the text\n   */\n  highlightSearchWords : function() {\n    var params = $.getQueryParameters();\n    var terms = (params.highlight) ? params.highlight[0].split(/\\s+/) : [];\n    if (terms.length) {\n      var body = $('div.body');\n      window.setTimeout(function() {\n        $.each(terms, function() {\n          body.highlightText(this.toLowerCase(), 'highlight');\n        });\n      }, 10);\n      $('<li class=\"highlight-link\"><a href=\"javascript:Documentation.' +\n        'hideSearchWords()\">' + _('Hide Search Matches') + '</a></li>')\n          .appendTo($('.sidebar .this-page-menu'));\n    }\n  },\n\n  /**\n   * init the modindex toggle buttons\n   */\n  initModIndex : function() {\n    var togglers = $('img.toggler').click(function() {\n      var src = $(this).attr('src');\n      var idnum = $(this).attr('id').substr(7);\n      console.log($('tr.cg-' + idnum).toggle());\n      if (src.substr(-9) == 'minus.png')\n        $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');\n      else\n        $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');\n    }).css('display', '');\n    if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {\n        togglers.click();\n    }\n  },\n\n  /**\n   * helper function to hide the search marks again\n   */\n  hideSearchWords : function() {\n    $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);\n    $('span.highlight').removeClass('highlight');\n  },\n\n  /**\n   * make the url absolute\n   */\n  makeURL : function(relativeURL) {\n    return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;\n  },\n\n  /**\n   * get the current relative url\n   */\n  getCurrentURL : function() {\n    var path = document.location.pathname;\n    var parts = path.split(/\\//);\n    $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\\//), function() {\n      if (this == '..')\n        parts.pop();\n    });\n    var url = parts.join('/');\n    return path.substring(url.lastIndexOf('/') + 1, path.length - 1);\n  }\n};\n\n// quick alias for translations\n_ = Documentation.gettext;\n\n$(document).ready(function() {\n  Documentation.init();\n});\n"
  },
  {
    "path": "doc/_build/html/_static/jquery.js",
    "content": "/*\n * jQuery 1.2.6 - New Wave Javascript\n *\n * Copyright (c) 2008 John Resig (jquery.com)\n * Dual licensed under the MIT (MIT-LICENSE.txt)\n * and GPL (GPL-LICENSE.txt) licenses.\n *\n * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $\n * $Rev: 5685 $\n */\n(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,isSimple=/^.[^:#\\[\\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector==\"string\"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else\nreturn jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?\"ready\":\"load\"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:\"1.2.6\",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||\"attr\"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,\"curCSS\");},text:function(text){if(typeof text!=\"object\"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret=\"\";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf(\"..\")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement(\"div\");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else\nreturn this.cloneNode(true);});var clone=ret.find(\"*\").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find(\"*\").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,\"events\");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else\nselector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is(\".\"+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,\"select\")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type==\"select-one\";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else\nreturn(this[0].value||\"\").replace(/\\r/g,\"\");}return undefined;}if(value.constructor==Number)value+='';return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,\"select\")){var values=jQuery.makeArray(value);jQuery(\"option\",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else\nthis.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(\".\");parts[1]=parts[1]?\".\"+parts[1]:\"\";if(value===undefined){var data=this.triggerHandler(\"getData\"+parts[1]+\"!\",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else\nreturn this.trigger(\"setData\"+parts[1]+\"!\",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,\"table\")&&jQuery.nodeName(elems[0],\"tr\"))obj=this.getElementsByTagName(\"tbody\")[0]||this.appendChild(this.ownerDocument.createElement(\"tbody\"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,\"script\"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery(\"script\",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:\"script\"});else\njQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||\"\");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=\"object\"&&typeof target!=\"function\")target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy==\"object\"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var expando=\"jQuery\"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!=\"string\"&&!fn.nodeName&&fn.constructor!=Array&&/^[\\s[]?function/.test(fn+\"\");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName(\"head\")[0]||document.documentElement,script=document.createElement(\"script\");script.type=\"text/javascript\";if(jQuery.browser.msie)script.text=data;else\nscript.appendChild(document.createTextNode(data));head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name=\"\";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else\nfor(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length==undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else\nfor(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type==\"curCSS\"&&!exclude.test(name)?value+\"px\":value;},className:{add:function(elem,classNames){jQuery.each((classNames||\"\").split(/\\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?\" \":\"\")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(\" \"):\"\";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name==\"width\"||name==\"height\"){var val,props={position:\"absolute\",visibility:\"hidden\",display:\"block\"},which=name==\"width\"?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"];function getWH(){val=name==\"width\"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,\"padding\"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,\"border\"+this+\"Width\",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(\":visible\"))getWH();else\njQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue(\"color\")==\"\";}if(name==\"opacity\"&&jQuery.browser.msie){ret=jQuery.attr(style,\"opacity\");return ret==\"\"?\"1\":ret;}if(jQuery.browser.opera&&name==\"display\"){var save=style.outline;style.outline=\"0 solid black\";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name=\"float\";name=name.replace(/([A-Z])/g,\"-$1\").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display=\"block\";}ret=name==\"display\"&&swap[stack.length-1]!=null?\"none\":(computedStyle&&computedStyle.getPropertyValue(name))||\"\";for(i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name==\"opacity\"&&ret==\"\")ret=\"1\";}else if(elem.currentStyle){var camelCase=name.replace(/\\-(\\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\\d+(px)?$/i.test(ret)&&/^\\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+\"px\";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem+='';if(typeof elem==\"string\"){elem=elem.replace(/(<(\\w+)[^>]*?)\\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+\"></\"+tag+\">\";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement(\"div\");var wrap=!tags.indexOf(\"<opt\")&&[1,\"<select multiple='multiple'>\",\"</select>\"]||!tags.indexOf(\"<leg\")&&[1,\"<fieldset>\",\"</fieldset>\"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,\"<table>\",\"</table>\"]||!tags.indexOf(\"<tr\")&&[2,\"<table><tbody>\",\"</tbody></table>\"]||(!tags.indexOf(\"<td\")||!tags.indexOf(\"<th\"))&&[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"]||!tags.indexOf(\"<col\")&&[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"]||jQuery.browser.msie&&[1,\"div<div>\",\"</div>\"]||[0,\"\",\"\"];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(\"<table\")&&tags.indexOf(\"<tbody\")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]==\"<table>\"&&tags.indexOf(\"<tbody\")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],\"tbody\")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,\"form\")&&!jQuery.nodeName(elem,\"select\")))return;if(elem[0]==undefined||jQuery.nodeName(elem,\"form\")||elem.options)ret.push(elem);else\nret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name==\"selected\"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name==\"type\"&&jQuery.nodeName(elem,\"input\")&&elem.parentNode)throw\"type property can't be changed\";elem[name]=value;}if(jQuery.nodeName(elem,\"form\")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&&notxml&&name==\"style\")return jQuery.attr(elem.style,\"cssText\",value);if(set)elem.setAttribute(name,\"\"+value);var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name==\"opacity\"){if(set){elem.zoom=1;elem.filter=(elem.filter||\"\").replace(/alpha\\([^)]*\\)/,\"\")+(parseInt(value)+''==\"NaN\"?\"\":\"alpha(opacity=\"+value*100+\")\");}return elem.filter&&elem.filter.indexOf(\"opacity=\")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':\"\";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||\"\").replace(/^\\s+|\\s+$/g,\"\");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else\nwhile(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++])if(elem.nodeType!=8)first[pos++]=elem;}else\nwhile(elem=second[i++])first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\\/: ]([\\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?\"styleFloat\":\"cssFloat\";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode==\"CSS1Compat\",props:{\"for\":\"htmlFor\",\"class\":\"className\",\"float\":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:\"readOnly\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,\"parentNode\");},next:function(elem){return jQuery.nth(elem,2,\"nextSibling\");},prev:function(elem){return jQuery.nth(elem,2,\"previousSibling\");},nextAll:function(elem){return jQuery.dir(elem,\"nextSibling\");},prevAll:function(elem){return jQuery.dir(elem,\"previousSibling\");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,\"iframe\")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector==\"string\")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,\"\");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?\"remove\":\"add\"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery(\"*\",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(\">*\",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each([\"Height\",\"Width\"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body[\"client\"+name]||jQuery.browser.safari&&window[\"inner\"+name]||document.compatMode==\"CSS1Compat\"&&document.documentElement[\"client\"+name]||document.body[\"client\"+name]:this[0]==document?Math.max(Math.max(document.body[\"scroll\"+name],document.documentElement[\"scroll\"+name]),Math.max(document.body[\"offset\"+name],document.documentElement[\"offset\"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+\"px\");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?\"(?:[\\\\w*_-]|\\\\\\\\.)\":\"(?:[\\\\w\\u0128-\\uFFFF*_-]|\\\\\\\\.)\",quickChild=new RegExp(\"^>\\\\s*(\"+chars+\"+)\"),quickID=new RegExp(\"^(\"+chars+\"+)(#)(\"+chars+\"+)\"),quickClass=new RegExp(\"^([#.]?)(\"+chars+\"*)\");jQuery.extend({expr:{\"\":function(a,i,m){return m[2]==\"*\"||jQuery.nodeName(a,m[2]);},\"#\":function(a,i,m){return a.getAttribute(\"id\")==m[2];},\":\":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},\"first-child\":function(a){return a.parentNode.getElementsByTagName(\"*\")[0]==a;},\"last-child\":function(a){return jQuery.nth(a.parentNode.lastChild,1,\"previousSibling\")==a;},\"only-child\":function(a){return!jQuery.nth(a.parentNode.lastChild,2,\"previousSibling\");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||\"\").indexOf(m[3])>=0;},visible:function(a){return\"hidden\"!=a.type&&jQuery.css(a,\"display\")!=\"none\"&&jQuery.css(a,\"visibility\")!=\"hidden\";},hidden:function(a){return\"hidden\"==a.type||jQuery.css(a,\"display\")==\"none\"||jQuery.css(a,\"visibility\")==\"hidden\";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,\"selected\");},text:function(a){return\"text\"==a.type;},radio:function(a){return\"radio\"==a.type;},checkbox:function(a){return\"checkbox\"==a.type;},file:function(a){return\"file\"==a.type;},password:function(a){return\"password\"==a.type;},submit:function(a){return\"submit\"==a.type;},image:function(a){return\"image\"==a.type;},reset:function(a){return\"reset\"==a.type;},button:function(a){return\"button\"==a.type||jQuery.nodeName(a,\"button\");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *('?\"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\(\"?'?(.*?(\\(.*?\\))?[^(]*?)\"?'?\\)/,new RegExp(\"^([:.#]*)(\"+chars+\"+)\")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\\s*,\\s*/,\"\");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!=\"string\")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName==\"*\"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,\"\");if(t.indexOf(\" \")==0)continue;foundToken=true;}else{re=/^([>+~])\\s*(\\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m==\"~\"||m==\"+\"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m==\"~\"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m==\"~\")merge[id]=true;r.push(n);}if(m==\"+\")break;}}ret=r;t=jQuery.trim(t.replace(re,\"\"));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(\",\")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=\" \"+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\\\/g,\"\");var elem=ret[ret.length-1];if(m[1]==\"#\"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id==\"string\"&&oid.id!=m[2])oid=jQuery('[@id=\"'+m[2]+'\"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]==\"#\"&&m[3]?m[3]:m[1]!=\"\"||m[0]==\"\"?\"*\":m[2];if(tag==\"*\"&&ret[i].nodeName.toLowerCase()==\"object\")tag=\"param\";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==\".\")r=jQuery.classFilter(r,m[2]);if(m[1]==\"#\"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute(\"id\")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,\"\");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=\" \"+m+\" \";var tmp=[];for(var i=0;r[i];i++){var pass=(\" \"+r[i].className+\" \").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\\\/g,\"\");break;}}if(!m)break;if(m[1]==\":\"&&m[2]==\"not\")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==\".\")r=jQuery.classFilter(r,m[2],not);else if(m[1]==\"[\"){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==\"\"&&!!z||type==\"=\"&&z==m[5]||type==\"!=\"&&z!=m[5]||type==\"^=\"&&z&&!z.indexOf(m[5])||type==\"$=\"&&z.substr(z.length-m[5].length)==m[5]||(type==\"*=\"||type==\"~=\")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==\":\"&&m[2]==\"nth-child\"){var merge={},tmp=[],test=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(m[3]==\"even\"&&\"2n\"||m[3]==\"odd\"&&\"2n+1\"||!/\\D/.test(m[3])&&\"0n+\"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn==\"object\")fn=fn[m[2]];if(typeof fn==\"string\")fn=eval(\"false||function(a,i){return \"+fn+\";}\");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,\"events\")||jQuery.data(elem,\"events\",{}),handle=jQuery.data(elem,\"handle\")||jQuery.data(elem,\"handle\",function(){if(typeof jQuery!=\"undefined\"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\\s+/),function(index,type){var parts=type.split(\".\");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent(\"on\"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,\"events\"),ret,index;if(events){if(types==undefined||(typeof types==\"string\"&&types.charAt(0)==\".\"))for(var type in events)this.remove(elem,type+(types||\"\"));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\\s+/),function(index,type){var parts=type.split(\".\");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else\nfor(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,\"handle\"),false);else if(elem.detachEvent)elem.detachEvent(\"on\"+type,jQuery.data(elem,\"handle\"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,\"handle\");if(handle)handle.elem=null;jQuery.removeData(elem,\"events\");jQuery.removeData(elem,\"handle\");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf(\"!\")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery(\"*\").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,\"handle\");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type==\"click\"))&&elem[\"on\"+type]&&elem[\"on\"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type==\"click\")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(\".\");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,\"events\")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props=\"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which\".split(\" \");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind(\"mouseover\",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind(\"mouseover\",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type=\"mouseenter\";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind(\"mouseout\",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind(\"mouseout\",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type=\"mouseleave\";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type==\"unload\"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else\njQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document);});jQuery.readyList=null;}jQuery(document).triggerHandler(\"ready\");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener(\"DOMContentLoaded\",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll(\"left\");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener(\"DOMContentLoaded\",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!=\"loaded\"&&document.readyState!=\"complete\"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery(\"style, link[rel=stylesheet]\").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,\"load\",jQuery.ready);}jQuery.each((\"blur,focus,load,resize,scroll,unload,click,dblclick,\"+\"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,\"+\"submit,keydown,keypress,keyup,error\").split(\",\"),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind(\"unload\",function(){jQuery(\"*\").add(document).unbind();});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!='string')return this._load(url);var off=url.indexOf(\" \");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type=\"GET\";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type=\"POST\";}var self=this;jQuery.ajax({url:url,type:type,dataType:\"html\",data:params,complete:function(res,status){if(status==\"success\"||status==\"notmodified\")self.html(selector?jQuery(\"<div/>\").append(res.responseText.replace(/<script(.|\\s)*?\\/script>/g,\"\")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,\"form\")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each(\"ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend\".split(\",\"),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:\"GET\",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,\"script\");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,\"json\");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:\"POST\",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:\"GET\",timeout:0,contentType:\"application/x-www-form-urlencoded\",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",script:\"text/javascript, application/javascript\",json:\"application/json, text/javascript\",text:\"text/plain\",_default:\"*/*\"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=\"string\")s.data=jQuery.param(s.data);if(s.dataType==\"jsonp\"){if(type==\"GET\"){if(!s.url.match(jsre))s.url+=(s.url.match(/\\?/)?\"&\":\"?\")+(s.jsonp||\"callback\")+\"=?\";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+\"&\":\"\")+(s.jsonp||\"callback\")+\"=?\";s.dataType=\"json\";}if(s.dataType==\"json\"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp=\"jsonp\"+jsc++;if(s.data)s.data=(s.data+\"\").replace(jsre,\"=\"+jsonp+\"$1\");s.url=s.url.replace(jsre,\"=\"+jsonp+\"$1\");s.dataType=\"script\";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType==\"script\"&&s.cache==null)s.cache=false;if(s.cache===false&&type==\"GET\"){var ts=now();var ret=s.url.replace(/(\\?|&)_=.*?(&|$)/,\"$1_=\"+ts+\"$2\");s.url=ret+((ret==s.url)?(s.url.match(/\\?/)?\"&\":\"?\")+\"_=\"+ts:\"\");}if(s.data&&type==\"GET\"){s.url+=(s.url.match(/\\?/)?\"&\":\"?\")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger(\"ajaxStart\");var remote=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;if(s.dataType==\"script\"&&type==\"GET\"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName(\"head\")[0];var script=document.createElement(\"script\");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState==\"loaded\"||this.readyState==\"complete\")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject(\"Microsoft.XMLHTTP\"):new XMLHttpRequest();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else\nxhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader(\"Content-Type\",s.contentType);if(s.ifModified)xhr.setRequestHeader(\"If-Modified-Since\",jQuery.lastModified[s.url]||\"Thu, 01 Jan 1970 00:00:00 GMT\");xhr.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");xhr.setRequestHeader(\"Accept\",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+\", */*\":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false;}if(s.global)jQuery.event.trigger(\"ajaxSend\",[xhr,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout==\"timeout\")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout==\"timeout\"&&\"timeout\"||!jQuery.httpSuccess(xhr)&&\"error\"||s.ifModified&&jQuery.httpNotModified(xhr,s.url)&&\"notmodified\"||\"success\";if(status==\"success\"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter);}catch(e){status=\"parsererror\";}}if(status==\"success\"){var modRes;try{modRes=xhr.getResponseHeader(\"Last-Modified\");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else\njQuery.handleError(s,xhr,status);complete();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr){xhr.abort();if(!requestDone)onreadystatechange(\"timeout\");}},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger(\"ajaxSuccess\",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger(\"ajaxComplete\",[xhr,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger(\"ajaxStop\");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger(\"ajaxError\",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol==\"file:\"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader(\"Last-Modified\");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined;}catch(e){}return false;},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader(\"content-type\"),xml=type==\"xml\"||!type&&ct&&ct.indexOf(\"xml\")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName==\"parsererror\")throw\"parsererror\";if(filter)data=filter(data,type);if(type==\"script\")jQuery.globalEval(data);if(type==\"json\")data=eval(\"(\"+data+\")\");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+\"=\"+encodeURIComponent(this.value));});else\nfor(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+\"=\"+encodeURIComponent(this));});else\ns.push(encodeURIComponent(j)+\"=\"+encodeURIComponent(jQuery.isFunction(a[j])?a[j]():a[j]));return s.join(\"&\").replace(/%20/g,\"+\");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:\"show\",width:\"show\",opacity:\"show\"},speed,callback):this.filter(\":hidden\").each(function(){this.style.display=this.oldblock||\"\";if(jQuery.css(this,\"display\")==\"none\"){var elem=jQuery(\"<\"+this.tagName+\" />\").appendTo(\"body\");this.style.display=elem.css(\"display\");if(this.style.display==\"none\")this.style.display=\"block\";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:\"hide\",width:\"hide\",opacity:\"hide\"},speed,callback):this.filter(\":visible\").each(function(){this.oldblock=this.oldblock||jQuery.css(this,\"display\");this.style.display=\"none\";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:\"toggle\",width:\"toggle\",opacity:\"toggle\"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(\":hidden\")?\"show\":\"hide\"]();});},slideDown:function(speed,callback){return this.animate({height:\"show\"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:\"hide\"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:\"toggle\"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:\"show\"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:\"hide\"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?\"each\":\"queue\"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(\":hidden\"),self=this;for(p in prop){if(prop[p]==\"hide\"&&hidden||prop[p]==\"show\"&&!hidden)return opt.complete.call(this);if(p==\"height\"||p==\"width\"){opt.display=jQuery.css(this,\"display\");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow=\"hidden\";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val==\"toggle\"?hidden?\"show\":\"hide\":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||\"px\";if(unit!=\"px\"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]==\"-=\"?-1:1)*end)+start;e.custom(start,end,unit);}else\ne.custom(start,val,\"\");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type=\"fx\";}if(!type||(typeof type==\"string\"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.call(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(elem){type=type||\"fx\";var q=jQuery.data(elem,type+\"queue\");if(!q||array)q=jQuery.data(elem,type+\"queue\",jQuery.makeArray(array));}return q;};jQuery.fn.dequeue=function(type){type=type||\"fx\";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].call(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop==\"height\"||this.prop==\"width\")this.elem.style.display=\"block\";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||\"px\";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop==\"width\"||this.prop==\"height\")this.elem.style[this.prop]=\"1px\";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,\"display\")==\"none\")this.elem.style.display=\"block\";}if(this.options.hide)this.elem.style.display=\"none\";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done)this.options.complete.call(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?\"swing\":\"linear\")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,\"opacity\",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,\"position\")==\"fixed\";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&css(offsetParent,\"position\")==\"fixed\")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,\"display\")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&css(parent,\"overflow\")!=\"visible\")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||css(offsetChild,\"position\")==\"absolute\"))||(mozilla&&css(offsetChild,\"position\")!=\"absolute\"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,\"borderLeftWidth\",true),jQuery.curCSS(elem,\"borderTopWidth\",true));}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0;}return results;};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each([\"Height\",\"Width\"],function(i,name){var tl=i?\"Left\":\"Top\",br=i?\"Right\":\"Bottom\";jQuery.fn[\"inner\"+name]=function(){return this[name.toLowerCase()]()+num(this,\"padding\"+tl)+num(this,\"padding\"+br);};jQuery.fn[\"outer\"+name]=function(margin){return this[\"inner\"+name]()+num(this,\"border\"+tl+\"Width\")+num(this,\"border\"+br+\"Width\")+(margin?num(this,\"margin\"+tl)+num(this,\"margin\"+br):0);};});})();"
  },
  {
    "path": "doc/_build/html/_static/pygments.css",
    "content": ".hll { background-color: #ffffcc }\n.c { color: #408090; font-style: italic } /* Comment */\n.err { border: 1px solid #FF0000 } /* Error */\n.k { color: #007020; font-weight: bold } /* Keyword */\n.o { color: #666666 } /* Operator */\n.cm { color: #408090; font-style: italic } /* Comment.Multiline */\n.cp { color: #007020 } /* Comment.Preproc */\n.c1 { color: #408090; font-style: italic } /* Comment.Single */\n.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */\n.gd { color: #A00000 } /* Generic.Deleted */\n.ge { font-style: italic } /* Generic.Emph */\n.gr { color: #FF0000 } /* Generic.Error */\n.gh { color: #000080; font-weight: bold } /* Generic.Heading */\n.gi { color: #00A000 } /* Generic.Inserted */\n.go { color: #303030 } /* Generic.Output */\n.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */\n.gs { font-weight: bold } /* Generic.Strong */\n.gu { color: #800080; font-weight: bold } /* Generic.Subheading */\n.gt { color: #0040D0 } /* Generic.Traceback */\n.kc { color: #007020; font-weight: bold } /* Keyword.Constant */\n.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */\n.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */\n.kp { color: #007020 } /* Keyword.Pseudo */\n.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */\n.kt { color: #902000 } /* Keyword.Type */\n.m { color: #208050 } /* Literal.Number */\n.s { color: #4070a0 } /* Literal.String */\n.na { color: #4070a0 } /* Name.Attribute */\n.nb { color: #007020 } /* Name.Builtin */\n.nc { color: #0e84b5; font-weight: bold } /* Name.Class */\n.no { color: #60add5 } /* Name.Constant */\n.nd { color: #555555; font-weight: bold } /* Name.Decorator */\n.ni { color: #d55537; font-weight: bold } /* Name.Entity */\n.ne { color: #007020 } /* Name.Exception */\n.nf { color: #06287e } /* Name.Function */\n.nl { color: #002070; font-weight: bold } /* Name.Label */\n.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */\n.nt { color: #062873; font-weight: bold } /* Name.Tag */\n.nv { color: #bb60d5 } /* Name.Variable */\n.ow { color: #007020; font-weight: bold } /* Operator.Word */\n.w { color: #bbbbbb } /* Text.Whitespace */\n.mf { color: #208050 } /* Literal.Number.Float */\n.mh { color: #208050 } /* Literal.Number.Hex */\n.mi { color: #208050 } /* Literal.Number.Integer */\n.mo { color: #208050 } /* Literal.Number.Oct */\n.sb { color: #4070a0 } /* Literal.String.Backtick */\n.sc { color: #4070a0 } /* Literal.String.Char */\n.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */\n.s2 { color: #4070a0 } /* Literal.String.Double */\n.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */\n.sh { color: #4070a0 } /* Literal.String.Heredoc */\n.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */\n.sx { color: #c65d09 } /* Literal.String.Other */\n.sr { color: #235388 } /* Literal.String.Regex */\n.s1 { color: #4070a0 } /* Literal.String.Single */\n.ss { color: #517918 } /* Literal.String.Symbol */\n.bp { color: #007020 } /* Name.Builtin.Pseudo */\n.vc { color: #bb60d5 } /* Name.Variable.Class */\n.vg { color: #bb60d5 } /* Name.Variable.Global */\n.vi { color: #bb60d5 } /* Name.Variable.Instance */\n.il { color: #208050 } /* Literal.Number.Integer.Long */"
  },
  {
    "path": "doc/_build/html/_static/searchtools.js",
    "content": "/*\n * searchtools.js\n * ~~~~~~~~~~~~~~\n *\n * Sphinx JavaScript utilties for the full-text search.\n *\n * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.\n * :license: BSD, see LICENSE for details.\n *\n */\n\n/**\n * helper function to return a node containing the\n * search summary for a given text. keywords is a list\n * of stemmed words, hlwords is the list of normal, unstemmed\n * words. the first one is used to find the occurance, the\n * latter for highlighting it.\n */\n\njQuery.makeSearchSummary = function(text, keywords, hlwords) {\n  var textLower = text.toLowerCase();\n  var start = 0;\n  $.each(keywords, function() {\n    var i = textLower.indexOf(this.toLowerCase());\n    if (i > -1)\n      start = i;\n  });\n  start = Math.max(start - 120, 0);\n  var excerpt = ((start > 0) ? '...' : '') +\n  $.trim(text.substr(start, 240)) +\n  ((start + 240 - text.length) ? '...' : '');\n  var rv = $('<div class=\"context\"></div>').text(excerpt);\n  $.each(hlwords, function() {\n    rv = rv.highlightText(this, 'highlight');\n  });\n  return rv;\n}\n\n/**\n * Porter Stemmer\n */\nvar PorterStemmer = function() {\n\n  var step2list = {\n    ational: 'ate',\n    tional: 'tion',\n    enci: 'ence',\n    anci: 'ance',\n    izer: 'ize',\n    bli: 'ble',\n    alli: 'al',\n    entli: 'ent',\n    eli: 'e',\n    ousli: 'ous',\n    ization: 'ize',\n    ation: 'ate',\n    ator: 'ate',\n    alism: 'al',\n    iveness: 'ive',\n    fulness: 'ful',\n    ousness: 'ous',\n    aliti: 'al',\n    iviti: 'ive',\n    biliti: 'ble',\n    logi: 'log'\n  };\n\n  var step3list = {\n    icate: 'ic',\n    ative: '',\n    alize: 'al',\n    iciti: 'ic',\n    ical: 'ic',\n    ful: '',\n    ness: ''\n  };\n\n  var c = \"[^aeiou]\";          // consonant\n  var v = \"[aeiouy]\";          // vowel\n  var C = c + \"[^aeiouy]*\";    // consonant sequence\n  var V = v + \"[aeiou]*\";      // vowel sequence\n\n  var mgr0 = \"^(\" + C + \")?\" + V + C;                      // [C]VC... is m>0\n  var meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\";    // [C]VC[V] is m=1\n  var mgr1 = \"^(\" + C + \")?\" + V + C + V + C;              // [C]VCVC... is m>1\n  var s_v   = \"^(\" + C + \")?\" + v;                         // vowel in stem\n\n  this.stemWord = function (w) {\n    var stem;\n    var suffix;\n    var firstch;\n    var origword = w;\n\n    if (w.length < 3)\n      return w;\n\n    var re;\n    var re2;\n    var re3;\n    var re4;\n\n    firstch = w.substr(0,1);\n    if (firstch == \"y\")\n      w = firstch.toUpperCase() + w.substr(1);\n\n    // Step 1a\n    re = /^(.+?)(ss|i)es$/;\n    re2 = /^(.+?)([^s])s$/;\n\n    if (re.test(w))\n      w = w.replace(re,\"$1$2\");\n    else if (re2.test(w))\n      w = w.replace(re2,\"$1$2\");\n\n    // Step 1b\n    re = /^(.+?)eed$/;\n    re2 = /^(.+?)(ed|ing)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      re = new RegExp(mgr0);\n      if (re.test(fp[1])) {\n        re = /.$/;\n        w = w.replace(re,\"\");\n      }\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1];\n      re2 = new RegExp(s_v);\n      if (re2.test(stem)) {\n        w = stem;\n        re2 = /(at|bl|iz)$/;\n        re3 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n        re4 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n        if (re2.test(w))\n          w = w + \"e\";\n        else if (re3.test(w)) {\n          re = /.$/;\n          w = w.replace(re,\"\");\n        }\n        else if (re4.test(w))\n          w = w + \"e\";\n      }\n    }\n\n    // Step 1c\n    re = /^(.+?)y$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(s_v);\n      if (re.test(stem))\n        w = stem + \"i\";\n    }\n\n    // Step 2\n    re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step2list[suffix];\n    }\n\n    // Step 3\n    re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      suffix = fp[2];\n      re = new RegExp(mgr0);\n      if (re.test(stem))\n        w = stem + step3list[suffix];\n    }\n\n    // Step 4\n    re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n    re2 = /^(.+?)(s|t)(ion)$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      if (re.test(stem))\n        w = stem;\n    }\n    else if (re2.test(w)) {\n      var fp = re2.exec(w);\n      stem = fp[1] + fp[2];\n      re2 = new RegExp(mgr1);\n      if (re2.test(stem))\n        w = stem;\n    }\n\n    // Step 5\n    re = /^(.+?)e$/;\n    if (re.test(w)) {\n      var fp = re.exec(w);\n      stem = fp[1];\n      re = new RegExp(mgr1);\n      re2 = new RegExp(meq1);\n      re3 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n      if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))\n        w = stem;\n    }\n    re = /ll$/;\n    re2 = new RegExp(mgr1);\n    if (re.test(w) && re2.test(w)) {\n      re = /.$/;\n      w = w.replace(re,\"\");\n    }\n\n    // and turn initial Y back to y\n    if (firstch == \"y\")\n      w = firstch.toLowerCase() + w.substr(1);\n    return w;\n  }\n}\n\n\n/**\n * Search Module\n */\nvar Search = {\n\n  _index : null,\n  _queued_query : null,\n  _pulse_status : -1,\n\n  init : function() {\n      var params = $.getQueryParameters();\n      if (params.q) {\n          var query = params.q[0];\n          $('input[name=\"q\"]')[0].value = query;\n          this.performSearch(query);\n      }\n  },\n\n  /**\n   * Sets the index\n   */\n  setIndex : function(index) {\n    var q;\n    this._index = index;\n    if ((q = this._queued_query) !== null) {\n      this._queued_query = null;\n      Search.query(q);\n    }\n  },\n\n  hasIndex : function() {\n      return this._index !== null;\n  },\n\n  deferQuery : function(query) {\n      this._queued_query = query;\n  },\n\n  stopPulse : function() {\n      this._pulse_status = 0;\n  },\n\n  startPulse : function() {\n    if (this._pulse_status >= 0)\n        return;\n    function pulse() {\n      Search._pulse_status = (Search._pulse_status + 1) % 4;\n      var dotString = '';\n      for (var i = 0; i < Search._pulse_status; i++)\n        dotString += '.';\n      Search.dots.text(dotString);\n      if (Search._pulse_status > -1)\n        window.setTimeout(pulse, 500);\n    };\n    pulse();\n  },\n\n  /**\n   * perform a search for something\n   */\n  performSearch : function(query) {\n    // create the required interface elements\n    this.out = $('#search-results');\n    this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);\n    this.dots = $('<span></span>').appendTo(this.title);\n    this.status = $('<p style=\"display: none\"></p>').appendTo(this.out);\n    this.output = $('<ul class=\"search\"/>').appendTo(this.out);\n\n    $('#search-progress').text(_('Preparing search...'));\n    this.startPulse();\n\n    // index already loaded, the browser was quick!\n    if (this.hasIndex())\n      this.query(query);\n    else\n      this.deferQuery(query);\n  },\n\n  query : function(query) {\n    var stopwords = ['and', 'then', 'into', 'it', 'as', 'are', 'in',\n                     'if', 'for', 'no', 'there', 'their', 'was', 'is',\n                     'be', 'to', 'that', 'but', 'they', 'not', 'such',\n                     'with', 'by', 'a', 'on', 'these', 'of', 'will',\n                     'this', 'near', 'the', 'or', 'at'];\n\n    // stem the searchterms and add them to the correct list\n    var stemmer = new PorterStemmer();\n    var searchterms = [];\n    var excluded = [];\n    var hlterms = [];\n    var tmp = query.split(/\\s+/);\n    var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;\n    for (var i = 0; i < tmp.length; i++) {\n      if ($u.indexOf(stopwords, tmp[i]) != -1 || tmp[i].match(/^\\d+$/)) {\n        // skip this word\n        continue;\n      }\n      // stem the word\n      var word = stemmer.stemWord(tmp[i]).toLowerCase();\n      // select the correct list\n      if (word[0] == '-') {\n        var toAppend = excluded;\n        word = word.substr(1);\n      }\n      else {\n        var toAppend = searchterms;\n        hlterms.push(tmp[i].toLowerCase());\n      }\n      // only add if not already in the list\n      if (!$.contains(toAppend, word))\n        toAppend.push(word);\n    };\n    var highlightstring = '?highlight=' + $.urlencode(hlterms.join(\" \"));\n\n    console.debug('SEARCH: searching for:');\n    console.info('required: ', searchterms);\n    console.info('excluded: ', excluded);\n\n    // prepare search\n    var filenames = this._index.filenames;\n    var titles = this._index.titles;\n    var terms = this._index.terms;\n    var descrefs = this._index.descrefs;\n    var modules = this._index.modules;\n    var desctypes = this._index.desctypes;\n    var fileMap = {};\n    var files = null;\n    var objectResults = [];\n    var regularResults = [];\n    $('#search-progress').empty();\n\n    // lookup as object\n    if (object != null) {\n      for (var module in modules) {\n        if (module.indexOf(object) > -1) {\n          fn = modules[module];\n          descr = _('module, in ') + titles[fn];\n          objectResults.push([filenames[fn], module, '#module-'+module, descr]);\n        }\n      }\n      for (var prefix in descrefs) {\n        for (var name in descrefs[prefix]) {\n          var fullname = (prefix ? prefix + '.' : '') + name;\n          if (fullname.toLowerCase().indexOf(object) > -1) {\n            match = descrefs[prefix][name];\n            descr = desctypes[match[1]] + _(', in ') + titles[match[0]];\n            objectResults.push([filenames[match[0]], fullname, '#'+fullname, descr]);\n          }\n        }\n      }\n    }\n\n    // sort results descending\n    objectResults.sort(function(a, b) {\n      return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);\n    });\n\n\n    // perform the search on the required terms\n    for (var i = 0; i < searchterms.length; i++) {\n      var word = searchterms[i];\n      // no match but word was a required one\n      if ((files = terms[word]) == null)\n        break;\n      if (files.length == undefined) {\n        files = [files];\n      }\n      // create the mapping\n      for (var j = 0; j < files.length; j++) {\n        var file = files[j];\n        if (file in fileMap)\n          fileMap[file].push(word);\n        else\n          fileMap[file] = [word];\n      }\n    }\n\n    // now check if the files don't contain excluded terms\n    for (var file in fileMap) {\n      var valid = true;\n\n      // check if all requirements are matched\n      if (fileMap[file].length != searchterms.length)\n        continue;\n\n      // ensure that none of the excluded terms is in the\n      // search result.\n      for (var i = 0; i < excluded.length; i++) {\n        if (terms[excluded[i]] == file ||\n            $.contains(terms[excluded[i]] || [], file)) {\n          valid = false;\n          break;\n        }\n      }\n\n      // if we have still a valid result we can add it\n      // to the result list\n      if (valid)\n        regularResults.push([filenames[file], titles[file], '', null]);\n    }\n\n    // delete unused variables in order to not waste\n    // memory until list is retrieved completely\n    delete filenames, titles, terms;\n\n    // now sort the regular results descending by title\n    regularResults.sort(function(a, b) {\n      var left = a[1].toLowerCase();\n      var right = b[1].toLowerCase();\n      return (left > right) ? -1 : ((left < right) ? 1 : 0);\n    });\n\n    // combine both\n    var results = regularResults.concat(objectResults);\n\n    // print the results\n    var resultCount = results.length;\n    function displayNextItem() {\n      // results left, load the summary and display it\n      if (results.length) {\n        var item = results.pop();\n        var listItem = $('<li style=\"display:none\"></li>');\n        listItem.append($('<a/>').attr(\n          'href',\n          item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +\n          highlightstring + item[2]).html(item[1]));\n        if (item[3]) {\n          listItem.append($('<span> (' + item[3] + ')</span>'));\n          Search.output.append(listItem);\n          listItem.slideDown(5, function() {\n            displayNextItem();\n          });\n        } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {\n          $.get('_sources/' + item[0] + '.txt', function(data) {\n            listItem.append($.makeSearchSummary(data, searchterms, hlterms));\n            Search.output.append(listItem);\n            listItem.slideDown(5, function() {\n              displayNextItem();\n            });\n          });\n        } else {\n          // no source available, just display title\n          Search.output.append(listItem);\n          listItem.slideDown(5, function() {\n            displayNextItem();\n          });\n        }\n      }\n      // search finished, update title and status message\n      else {\n        Search.stopPulse();\n        Search.title.text(_('Search Results'));\n        if (!resultCount)\n          Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\\'ve selected enough categories.'));\n        else\n            Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));\n        Search.status.fadeIn(500);\n      }\n    }\n    displayNextItem();\n  }\n}\n\n$(document).ready(function() {\n  Search.init();\n});\n"
  },
  {
    "path": "doc/_build/html/_static/underscore.js",
    "content": "(function(){var j=this,n=j._,i=function(a){this._wrapped=a},m=typeof StopIteration!==\"undefined\"?StopIteration:\"__break__\",b=j._=function(a){return new i(a)};if(typeof exports!==\"undefined\")exports._=b;var k=Array.prototype.slice,o=Array.prototype.unshift,p=Object.prototype.toString,q=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;b.VERSION=\"0.5.5\";b.each=function(a,c,d){try{if(a.forEach)a.forEach(c,d);else if(b.isArray(a)||b.isArguments(a))for(var e=0,f=a.length;e<f;e++)c.call(d,\na[e],e,a);else{var g=b.keys(a);f=g.length;for(e=0;e<f;e++)c.call(d,a[g[e]],g[e],a)}}catch(h){if(h!=m)throw h;}return a};b.map=function(a,c,d){if(a&&b.isFunction(a.map))return a.map(c,d);var e=[];b.each(a,function(f,g,h){e.push(c.call(d,f,g,h))});return e};b.reduce=function(a,c,d,e){if(a&&b.isFunction(a.reduce))return a.reduce(b.bind(d,e),c);b.each(a,function(f,g,h){c=d.call(e,c,f,g,h)});return c};b.reduceRight=function(a,c,d,e){if(a&&b.isFunction(a.reduceRight))return a.reduceRight(b.bind(d,e),c);\nvar f=b.clone(b.toArray(a)).reverse();b.each(f,function(g,h){c=d.call(e,c,g,h,a)});return c};b.detect=function(a,c,d){var e;b.each(a,function(f,g,h){if(c.call(d,f,g,h)){e=f;b.breakLoop()}});return e};b.select=function(a,c,d){if(a&&b.isFunction(a.filter))return a.filter(c,d);var e=[];b.each(a,function(f,g,h){c.call(d,f,g,h)&&e.push(f)});return e};b.reject=function(a,c,d){var e=[];b.each(a,function(f,g,h){!c.call(d,f,g,h)&&e.push(f)});return e};b.all=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.every))return a.every(c,\nd);var e=true;b.each(a,function(f,g,h){(e=e&&c.call(d,f,g,h))||b.breakLoop()});return e};b.any=function(a,c,d){c=c||b.identity;if(a&&b.isFunction(a.some))return a.some(c,d);var e=false;b.each(a,function(f,g,h){if(e=c.call(d,f,g,h))b.breakLoop()});return e};b.include=function(a,c){if(b.isArray(a))return b.indexOf(a,c)!=-1;var d=false;b.each(a,function(e){if(d=e===c)b.breakLoop()});return d};b.invoke=function(a,c){var d=b.rest(arguments,2);return b.map(a,function(e){return(c?e[c]:e).apply(e,d)})};b.pluck=\nfunction(a,c){return b.map(a,function(d){return d[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);var e={computed:-Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g>=e.computed&&(e={value:f,computed:g})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);var e={computed:Infinity};b.each(a,function(f,g,h){g=c?c.call(d,f,g,h):f;g<e.computed&&(e={value:f,computed:g})});return e.value};b.sortBy=function(a,c,d){return b.pluck(b.map(a,\nfunction(e,f,g){return{value:e,criteria:c.call(d,e,f,g)}}).sort(function(e,f){e=e.criteria;f=f.criteria;return e<f?-1:e>f?1:0}),\"value\")};b.sortedIndex=function(a,c,d){d=d||b.identity;for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?(e=g+1):(f=g)}return e};b.toArray=function(a){if(!a)return[];if(a.toArray)return a.toArray();if(b.isArray(a))return a;if(b.isArguments(a))return k.call(a);return b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=function(a,c,d){return c&&!d?k.call(a,\n0,c):a[0]};b.rest=function(a,c,d){return k.call(a,b.isUndefined(c)||d?1:c)};b.last=function(a){return a[a.length-1]};b.compact=function(a){return b.select(a,function(c){return!!c})};b.flatten=function(a){return b.reduce(a,[],function(c,d){if(b.isArray(d))return c.concat(b.flatten(d));c.push(d);return c})};b.without=function(a){var c=b.rest(arguments);return b.select(a,function(d){return!b.include(c,d)})};b.uniq=function(a,c){return b.reduce(a,[],function(d,e,f){if(0==f||(c===true?b.last(d)!=e:!b.include(d,\ne)))d.push(e);return d})};b.intersect=function(a){var c=b.rest(arguments);return b.select(b.uniq(a),function(d){return b.all(c,function(e){return b.indexOf(e,d)>=0})})};b.zip=function(){for(var a=b.toArray(arguments),c=b.max(b.pluck(a,\"length\")),d=new Array(c),e=0;e<c;e++)d[e]=b.pluck(a,String(e));return d};b.indexOf=function(a,c){if(a.indexOf)return a.indexOf(c);for(var d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,c){if(a.lastIndexOf)return a.lastIndexOf(c);for(var d=\na.length;d--;)if(a[d]===c)return d;return-1};b.range=function(a,c,d){var e=b.toArray(arguments),f=e.length<=1;a=f?0:e[0];c=f?e[0]:e[1];d=e[2]||1;e=Math.ceil((c-a)/d);if(e<=0)return[];e=new Array(e);f=a;for(var g=0;1;f+=d){if((d>0?f-c:c-f)>=0)return e;e[g++]=f}};b.bind=function(a,c){var d=b.rest(arguments,2);return function(){return a.apply(c||j,d.concat(b.toArray(arguments)))}};b.bindAll=function(a){var c=b.rest(arguments);if(c.length==0)c=b.functions(a);b.each(c,function(d){a[d]=b.bind(a[d],a)});\nreturn a};b.delay=function(a,c){var d=b.rest(arguments,2);return setTimeout(function(){return a.apply(a,d)},c)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(b.rest(arguments)))};b.wrap=function(a,c){return function(){var d=[a].concat(b.toArray(arguments));return c.apply(c,d)}};b.compose=function(){var a=b.toArray(arguments);return function(){for(var c=b.toArray(arguments),d=a.length-1;d>=0;d--)c=[a[d].apply(this,c)];return c[0]}};b.keys=function(a){if(b.isArray(a))return b.range(0,a.length);\nvar c=[];for(var d in a)q.call(a,d)&&c.push(d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=function(a){return b.select(b.keys(a),function(c){return b.isFunction(a[c])}).sort()};b.extend=function(a,c){for(var d in c)a[d]=c[d];return a};b.clone=function(a){if(b.isArray(a))return a.slice(0);return b.extend({},a)};b.tap=function(a,c){c(a);return a};b.isEqual=function(a,c){if(a===c)return true;var d=typeof a;if(d!=typeof c)return false;if(a==c)return true;if(!a&&c||a&&!c)return false;\nif(a.isEqual)return a.isEqual(c);if(b.isDate(a)&&b.isDate(c))return a.getTime()===c.getTime();if(b.isNaN(a)&&b.isNaN(c))return true;if(b.isRegExp(a)&&b.isRegExp(c))return a.source===c.source&&a.global===c.global&&a.ignoreCase===c.ignoreCase&&a.multiline===c.multiline;if(d!==\"object\")return false;if(a.length&&a.length!==c.length)return false;d=b.keys(a);var e=b.keys(c);if(d.length!=e.length)return false;for(var f in a)if(!b.isEqual(a[f],c[f]))return false;return true};b.isEmpty=function(a){return b.keys(a).length==\n0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=function(a){return!!(a&&a.concat&&a.unshift)};b.isArguments=function(a){return a&&b.isNumber(a.length)&&!b.isArray(a)&&!r.call(a,\"length\")};b.isFunction=function(a){return!!(a&&a.constructor&&a.call&&a.apply)};b.isString=function(a){return!!(a===\"\"||a&&a.charCodeAt&&a.substr)};b.isNumber=function(a){return p.call(a)===\"[object Number]\"};b.isDate=function(a){return!!(a&&a.getTimezoneOffset&&a.setUTCFullYear)};b.isRegExp=function(a){return!!(a&&\na.test&&a.exec&&(a.ignoreCase||a.ignoreCase===false))};b.isNaN=function(a){return b.isNumber(a)&&isNaN(a)};b.isNull=function(a){return a===null};b.isUndefined=function(a){return typeof a==\"undefined\"};b.noConflict=function(){j._=n;return this};b.identity=function(a){return a};b.breakLoop=function(){throw m;};var s=0;b.uniqueId=function(a){var c=s++;return a?a+c:c};b.template=function(a,c){a=new Function(\"obj\",\"var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('\"+a.replace(/[\\r\\t\\n]/g,\n\" \").replace(/'(?=[^%]*%>)/g,\"\\t\").split(\"'\").join(\"\\\\'\").split(\"\\t\").join(\"'\").replace(/<%=(.+?)%>/g,\"',$1,'\").split(\"<%\").join(\"');\").split(\"%>\").join(\"p.push('\")+\"');}return p.join('');\");return c?a(c):a};b.forEach=b.each;b.foldl=b.inject=b.reduce;b.foldr=b.reduceRight;b.filter=b.select;b.every=b.all;b.some=b.any;b.head=b.first;b.tail=b.rest;b.methods=b.functions;var l=function(a,c){return c?b(a).chain():a};b.each(b.functions(b),function(a){var c=b[a];i.prototype[a]=function(){var d=b.toArray(arguments);\no.call(d,this._wrapped);return l(c.apply(b,d),this._chain)}});b.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){c.apply(this._wrapped,arguments);return l(this._wrapped,this._chain)}});b.each([\"concat\",\"join\",\"slice\"],function(a){var c=Array.prototype[a];i.prototype[a]=function(){return l(c.apply(this._wrapped,arguments),this._chain)}});i.prototype.chain=function(){this._chain=true;return this};i.prototype.value=function(){return this._wrapped}})();\n"
  },
  {
    "path": "doc/_build/html/genindex.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Index &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"index.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"#\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n\n   <h1 id=\"index\">Index</h1>\n\n   <div class=\"genindex-jumpbox\">\n   <a href=\"#A\"><strong>A</strong></a> | <a href=\"#B\"><strong>B</strong></a> | <a href=\"#C\"><strong>C</strong></a> | <a href=\"#E\"><strong>E</strong></a> | <a href=\"#I\"><strong>I</strong></a> | <a href=\"#P\"><strong>P</strong></a> | <a href=\"#R\"><strong>R</strong></a> | <a href=\"#S\"><strong>S</strong></a> | <a href=\"#T\"><strong>T</strong></a> \n   </div>\n<h2 id=\"A\">A</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Curve.adaptive\">adaptive (potrace.Curve attribute)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"B\">B</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.BezierSegment\">BezierSegment (class in potrace)</a></dt>\n</dl></td>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Bitmap\">Bitmap (class in potrace)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"C\">C</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.CornerSegment.c\">c (potrace.CornerSegment attribute)</a></dt>\n    <dt><a href=\"ref.html#potrace.BezierSegment.c1\">c1 (potrace.BezierSegment attribute)</a></dt>\n    <dt><a href=\"ref.html#potrace.BezierSegment.c2\">c2 (potrace.BezierSegment attribute)</a></dt>\n    <dt><a href=\"ref.html#potrace.Curve.children\">children (potrace.Curve attribute)</a></dt>\n</dl></td>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.CornerSegment\">CornerSegment (class in potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.Curve\">Curve (class in potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.Path.curves\">curves (potrace.Path attribute)</a></dt>\n    <dt><a href=\"ref.html#potrace.Path.curves_tree\">curves_tree (potrace.Path attribute)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"E\">E</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.BezierSegment.end_point\">end_point (potrace.BezierSegment attribute)</a></dt>\n    <dd><dl>\n      <dt><a href=\"ref.html#potrace.CornerSegment.end_point\">(potrace.CornerSegment attribute)</a></dt>\n  </dl></dd>\n</dl></td>\n</tr></table>\n\n<h2 id=\"I\">I</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.BezierSegment.is_corner\">is_corner (potrace.BezierSegment attribute)</a></dt>\n    <dd><dl>\n      <dt><a href=\"ref.html#potrace.CornerSegment.is_corner\">(potrace.CornerSegment attribute)</a></dt>\n  </dl></dd>\n</dl></td>\n</tr></table>\n\n<h2 id=\"P\">P</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Path\">Path (class in potrace)</a></dt>\n    <dt><a href=\"ref.html#module-potrace\">potrace (module)</a></dt>\n</dl></td>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.potracelib_version\">potracelib_version() (in module potrace)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"R\">R</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Curve.regular\">regular (potrace.Curve attribute)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"S\">S</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Curve.segments\">segments (potrace.Curve attribute)</a></dt>\n</dl></td>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Curve.start_point\">start_point (potrace.Curve attribute)</a></dt>\n</dl></td>\n</tr></table>\n\n<h2 id=\"T\">T</h2>\n<table width=\"100%\" class=\"indextable genindextable\"><tr>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.Curve.tesselate\">tesselate() (potrace.Curve method)</a></dt>\n    <dt><a href=\"ref.html#potrace.Bitmap.trace\">trace() (potrace.Bitmap method)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_BLACK\">TURNPOLICY_BLACK (in module potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_LEFT\">TURNPOLICY_LEFT (in module potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_MAJORITY\">TURNPOLICY_MAJORITY (in module potrace)</a></dt>\n</dl></td>\n  <td width=\"33%\" valign=\"top\"><dl>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_MINORITY\">TURNPOLICY_MINORITY (in module potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_RANDOM\">TURNPOLICY_RANDOM (in module potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_RIGHT\">TURNPOLICY_RIGHT (in module potrace)</a></dt>\n    <dt><a href=\"ref.html#potrace.TURNPOLICY_WHITE\">TURNPOLICY_WHITE (in module potrace)</a></dt>\n</dl></td>\n</tr></table>\n\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n\n   \n\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" size=\"18\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"#\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "doc/_build/html/index.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>pypotrace documentation &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"#\" />\n    <link rel=\"next\" title=\"Tutorial\" href=\"tutorial.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"tutorial.html\" title=\"Tutorial\"\n             accesskey=\"N\">next</a> |</li>\n        <li><a href=\"#\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <div class=\"section\" id=\"pypotrace-documentation\">\n<h1>pypotrace documentation<a class=\"headerlink\" href=\"#pypotrace-documentation\" title=\"Permalink to this headline\">¶</a></h1>\n<p>pypotrace are Python bindings for <a class=\"reference external\" href=\"http://potrace.sourceforge.net/\">potrace</a>, an utility to transform bitmap\nimages into vector images.</p>\n<p>Contents:</p>\n<div class=\"toctree-wrapper compound\">\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference external\" href=\"tutorial.html\">Tutorial</a></li>\n<li class=\"toctree-l1\"><a class=\"reference external\" href=\"ref.html\"><tt class=\"docutils literal\"><span class=\"pre\">potrace</span></tt> &#8211; API reference</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference external\" href=\"ref.html#bitmap-objects\">Bitmap objects</a></li>\n<li class=\"toctree-l2\"><a class=\"reference external\" href=\"ref.html#path-objects\">Path objects</a></li>\n<li class=\"toctree-l2\"><a class=\"reference external\" href=\"ref.html#curve-objects\">Curve objects</a></li>\n</ul>\n</li>\n</ul>\n</div>\n</div>\n<div class=\"section\" id=\"indices-and-tables\">\n<h1>Indices and tables<a class=\"headerlink\" href=\"#indices-and-tables\" title=\"Permalink to this headline\">¶</a></h1>\n<ul class=\"simple\">\n<li><a class=\"reference external\" href=\"genindex.html\"><em>Index</em></a></li>\n<li><a class=\"reference external\" href=\"modindex.html\"><em>Module Index</em></a></li>\n<li><a class=\"reference external\" href=\"search.html\"><em>Search Page</em></a></li>\n</ul>\n</div>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h3><a href=\"#\">Table Of Contents</a></h3>\n  <ul>\n<li><a class=\"reference external\" href=\"#\">pypotrace documentation</a><ul>\n</ul>\n</li>\n<li><a class=\"reference external\" href=\"#indices-and-tables\">Indices and tables</a></li>\n</ul>\n\n  <h4>Next topic</h4>\n  <p class=\"topless\"><a href=\"tutorial.html\"\n                        title=\"next chapter\">Tutorial</a></p>\n  <h3>This Page</h3>\n  <ul class=\"this-page-menu\">\n    <li><a href=\"_sources/index.txt\"\n           rel=\"nofollow\">Show Source</a></li>\n  </ul>\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" size=\"18\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"tutorial.html\" title=\"Tutorial\"\n             >next</a> |</li>\n        <li><a href=\"#\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "doc/_build/html/modindex.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Global Module Index &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"index.html\" />\n \n\n    <script type=\"text/javascript\">\n      DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;\n    </script>\n\n\n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"#\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n\n   <h1 id=\"global-module-index\">Global Module Index</h1>\n\n   <div class=\"modindex-jumpbox\">\n   <a href=\"#cap-P\"><strong>P</strong></a> \n   </div>\n\n   <table class=\"indextable modindextable\" cellspacing=\"0\" cellpadding=\"2\"><tr class=\"pcap\"><td></td><td>&nbsp;</td><td></td></tr>\n   <tr class=\"cap\"><td></td><td><a name=\"cap-P\"><strong>P</strong></a></td><td></td></tr><tr>\n     <td></td>\n     <td>\n     <a href=\"ref.html#module-potrace\"><tt class=\"xref\">potrace</tt></a></td><td>\n     <em></em></td></tr>\n   </table>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" size=\"18\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"#\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "doc/_build/html/objects.inv",
    "content": "# Sphinx inventory version 1\n# Project: potrace\n# Version: 0.1\npotrace mod ref.html\npotrace.TURNPOLICY_MINORITY data ref.html\npotrace.CornerSegment class ref.html\npotrace.CornerSegment.c attribute ref.html\npotrace.TURNPOLICY_BLACK data ref.html\npotrace.BezierSegment.c1 attribute ref.html\npotrace.Curve.segments attribute ref.html\npotrace.potracelib_version function ref.html\npotrace.BezierSegment.end_point attribute ref.html\npotrace.CornerSegment.end_point attribute ref.html\npotrace.CornerSegment.is_corner attribute ref.html\npotrace.TURNPOLICY_WHITE data ref.html\npotrace.Bitmap.trace method ref.html\npotrace.BezierSegment class ref.html\npotrace.Curve.tesselate method ref.html\npotrace.Curve.regular attribute ref.html\npotrace.Curve.start_point attribute ref.html\npotrace.Curve.children attribute ref.html\npotrace.TURNPOLICY_MAJORITY data ref.html\npotrace.Curve.adaptive attribute ref.html\npotrace.TURNPOLICY_LEFT data ref.html\npotrace.Path.curves_tree attribute ref.html\npotrace.TURNPOLICY_RIGHT data ref.html\npotrace.BezierSegment.is_corner attribute ref.html\npotrace.Curve class ref.html\npotrace.BezierSegment.c2 attribute ref.html\npotrace.Path.curves attribute ref.html\npotrace.TURNPOLICY_RANDOM data ref.html\npotrace.Path class ref.html\npotrace.Bitmap class ref.html\n"
  },
  {
    "path": "doc/_build/html/ref.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>potrace – API reference &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"index.html\" />\n    <link rel=\"prev\" title=\"Tutorial\" href=\"tutorial.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"tutorial.html\" title=\"Tutorial\"\n             accesskey=\"P\">previous</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <div class=\"section\" id=\"module-potrace\">\n<h1><a title=\"\" class=\"reference external\" href=\"#module-potrace\"><tt class=\"xref docutils literal\"><span class=\"pre\">potrace</span></tt></a> &#8211; API reference<a class=\"headerlink\" href=\"#module-potrace\" title=\"Permalink to this headline\">¶</a></h1>\n<dl class=\"function\">\n<dt id=\"potrace.potracelib_version\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">potracelib_version</tt><big>(</big><big>)</big><a class=\"headerlink\" href=\"#potrace.potracelib_version\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>Return the potrace library version.</dd></dl>\n\n<p>Constants for <a title=\"potrace.Bitmap.trace\" class=\"reference internal\" href=\"#potrace.Bitmap.trace\"><tt class=\"xref docutils literal\"><span class=\"pre\">Bitmap.trace()</span></tt></a> <em>turnpolicy</em> parameter:</p>\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_BLACK\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_BLACK</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_BLACK\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_WHITE\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_WHITE</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_WHITE\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_LEFT\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_LEFT</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_LEFT\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_RIGHT\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_RIGHT</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_RIGHT\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_MINORITY\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_MINORITY</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_MINORITY\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_MAJORITY\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_MAJORITY</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_MAJORITY\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"data\">\n<dt id=\"potrace.TURNPOLICY_RANDOM\">\n<tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">TURNPOLICY_RANDOM</tt><a class=\"headerlink\" href=\"#potrace.TURNPOLICY_RANDOM\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<div class=\"section\" id=\"bitmap-objects\">\n<h2>Bitmap objects<a class=\"headerlink\" href=\"#bitmap-objects\" title=\"Permalink to this headline\">¶</a></h2>\n<p>You start a trace by creating a <a title=\"potrace.Bitmap\" class=\"reference internal\" href=\"#potrace.Bitmap\"><tt class=\"xref docutils literal\"><span class=\"pre\">Bitmap</span></tt></a> instance, e.g.:</p>\n<div class=\"highlight-python\"><div class=\"highlight\"><pre><span class=\"kn\">from</span> <span class=\"nn\">potrace</span> <span class=\"kn\">import</span> <span class=\"n\">Bitmap</span>\n\n<span class=\"c\"># Initialize data, for example convert a PIL image to a numpy array</span>\n<span class=\"c\"># [...]</span>\n\n<span class=\"n\">bitmap</span> <span class=\"o\">=</span> <span class=\"n\">Bitmap</span><span class=\"p\">(</span><span class=\"n\">data</span><span class=\"p\">)</span>\n<span class=\"n\">path</span> <span class=\"o\">=</span> <span class=\"n\">bitmap</span><span class=\"o\">.</span><span class=\"n\">trace</span><span class=\"p\">()</span>\n</pre></div>\n</div>\n<dl class=\"class\">\n<dt id=\"potrace.Bitmap\">\n<em class=\"property\">class </em><tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">Bitmap</tt><big>(</big><em>data</em><big>)</big><a class=\"headerlink\" href=\"#potrace.Bitmap\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Create a Bitmap instance.</p>\n<p>The constructor <em>data</em> argument should be a 2D numpy array containing pixel\ndata. Pixels are only interpreted as zero or nonzero.</p>\n<dl class=\"method\">\n<dt id=\"potrace.Bitmap.trace\">\n<tt class=\"descname\">trace</tt><big>(</big><span class=\"optional\">[</span><em>turdsize</em>, <em>turnpolicy</em>, <em>alphamax</em>, <em>opticurve</em>, <em>opttolerance</em>, <em>progress_func</em><span class=\"optional\">]</span><big>)</big><a class=\"headerlink\" href=\"#potrace.Bitmap.trace\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Trace the bitmap and wrap the result in a <a title=\"potrace.Path\" class=\"reference internal\" href=\"#potrace.Path\"><tt class=\"xref docutils literal\"><span class=\"pre\">Path</span></tt></a> instance.</p>\n<p>The <em>turdsize</em> parameter can be used to &#8220;despeckle&#8221; the bitmap to be\ntraced, by removing all curves whose enclosed area is below the given\nthreshold. The current default for the <em>turdsize</em> parameter is 2; its\nuseful range is from 0 to infinity.</p>\n<p>The <em>turnpolicy</em> parameter determines how to resolve ambiguities during\ndecomposition of bitmaps into paths. The possible choices for the\n<em>turnpolicy</em> parameter are:</p>\n<ul class=\"simple\">\n<li><a title=\"potrace.TURNPOLICY_BLACK\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_BLACK\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_BLACK</span></tt></a>: prefers to connect black\n(foreground) components.</li>\n<li><a title=\"potrace.TURNPOLICY_WHITE\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_WHITE\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_WHITE</span></tt></a>: prefers to connect white\n(background) components.</li>\n<li><a title=\"potrace.TURNPOLICY_LEFT\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_LEFT\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_LEFT</span></tt></a>: always take a left turn.</li>\n<li><a title=\"potrace.TURNPOLICY_RIGHT\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_RIGHT\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_RIGHT</span></tt></a>: always take a right turn.</li>\n<li><a title=\"potrace.TURNPOLICY_MINORITY\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_MINORITY\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_MINORITY</span></tt></a>: prefers to connect the color\n(black or white) that occurs least frequently in a local neighborhood\nof the current position.</li>\n<li><a title=\"potrace.TURNPOLICY_MAJORITY\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_MAJORITY\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_MAJORITY</span></tt></a>: prefers to connect the color \n(black or white) that occurs most frequently in a local neighborhood\nof the current position.</li>\n<li><a title=\"potrace.TURNPOLICY_RANDOM\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_RANDOM\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_RANDOM</span></tt></a>: choose randomly.</li>\n</ul>\n<p>The current default policy is <a title=\"potrace.TURNPOLICY_MINORITY\" class=\"reference internal\" href=\"#potrace.TURNPOLICY_MINORITY\"><tt class=\"xref docutils literal\"><span class=\"pre\">TURNPOLICY_MINORITY</span></tt></a>, which tends\nto keep visual lines connected.</p>\n<p>The <em>alphamax</em> parameter is a threshold for the detection of corners.\nIt controls the smoothness of the traced curve. The current default is\n1.0; useful range of this parameter is from 0.0 (polygon) to 1.3333\n(no corners).</p>\n<p>The <em>opticurve</em> parameter is a boolean flag that controls whether\nPotrace will attempt to &#8220;simplify&#8221; the final curve by reducing the\nnumber of Bezier curve segments.  Opticurve=1 turns on optimization,\nand <em>opticurve=0</em> turns it off. The current default is on.</p>\n<p>The <em>opttolerance</em> parameter defines the amount of error allowed in\nthis simplification. The current default is 0.2. Larger values tend to\ndecrease the number of segments, at the expense of less accuracy. The\nuseful range is from 0 to infinity, although in practice one would\nhardly choose values greater than 1 or so. For most purposes, the\ndefault value is a good tradeoff between space and accuracy.</p>\n</dd></dl>\n\n</dd></dl>\n\n</div>\n<div class=\"section\" id=\"path-objects\">\n<h2>Path objects<a class=\"headerlink\" href=\"#path-objects\" title=\"Permalink to this headline\">¶</a></h2>\n<p><a title=\"potrace.Bitmap.trace\" class=\"reference internal\" href=\"#potrace.Bitmap.trace\"><tt class=\"xref docutils literal\"><span class=\"pre\">Bitmap.trace()</span></tt></a> returns a <a title=\"potrace.Path\" class=\"reference internal\" href=\"#potrace.Path\"><tt class=\"xref docutils literal\"><span class=\"pre\">Path</span></tt></a> instance, containing the whole\nvectorized image.</p>\n<dl class=\"class\">\n<dt id=\"potrace.Path\">\n<em class=\"property\">class </em><tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">Path</tt><a class=\"headerlink\" href=\"#potrace.Path\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Path objects store a list of <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> objects.</p>\n<dl class=\"attribute\">\n<dt id=\"potrace.Path.curves\">\n<tt class=\"descname\">curves</tt><a class=\"headerlink\" href=\"#potrace.Path.curves\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The list of <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> objects composing the path.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.Path.curves_tree\">\n<tt class=\"descname\">curves_tree</tt><a class=\"headerlink\" href=\"#potrace.Path.curves_tree\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The top level <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> objects in the tree representation of the\npath.</dd></dl>\n\n</dd></dl>\n\n</div>\n<div class=\"section\" id=\"curve-objects\">\n<h2>Curve objects<a class=\"headerlink\" href=\"#curve-objects\" title=\"Permalink to this headline\">¶</a></h2>\n<p><a title=\"potrace.Path\" class=\"reference internal\" href=\"#potrace.Path\"><tt class=\"xref docutils literal\"><span class=\"pre\">Path</span></tt></a> objects are made of one or more of <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> objects,\nwhich are themselves composed of a list of segments.</p>\n<p>Curves can have children curves. Children curves are guaranteed to be enclosed\nby their parent.</p>\n<dl class=\"class\">\n<dt id=\"potrace.Curve\">\n<em class=\"property\">class </em><tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">Curve</tt><a class=\"headerlink\" href=\"#potrace.Curve\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Curve objects represent closed, non intersecting curves.</p>\n<p>Curves are made of a list of <a title=\"potrace.BezierSegment\" class=\"reference internal\" href=\"#potrace.BezierSegment\"><tt class=\"xref docutils literal\"><span class=\"pre\">BezierSegment</span></tt></a> and\n<a title=\"potrace.CornerSegment\" class=\"reference internal\" href=\"#potrace.CornerSegment\"><tt class=\"xref docutils literal\"><span class=\"pre\">CornerSegment</span></tt></a> objects connected to each other.</p>\n<dl class=\"attribute\">\n<dt id=\"potrace.Curve.regular\">\n<tt class=\"descname\">regular</tt><a class=\"headerlink\" href=\"#potrace.Curve.regular\" title=\"Permalink to this definition\">¶</a></dt>\n<dd></dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.Curve.adaptive\">\n<tt class=\"descname\">adaptive</tt><a class=\"headerlink\" href=\"#potrace.Curve.adaptive\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>Constants for the <a title=\"potrace.Curve.tesselate\" class=\"reference internal\" href=\"#potrace.Curve.tesselate\"><tt class=\"xref docutils literal\"><span class=\"pre\">tesselate()</span></tt></a> method.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.Curve.start_point\">\n<tt class=\"descname\">start_point</tt><a class=\"headerlink\" href=\"#potrace.Curve.start_point\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The curve starting point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.Curve.segments\">\n<tt class=\"descname\">segments</tt><a class=\"headerlink\" href=\"#potrace.Curve.segments\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The list of segment objects that compose the curve.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.Curve.children\">\n<tt class=\"descname\">children</tt><a class=\"headerlink\" href=\"#potrace.Curve.children\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The list of children curves.</dd></dl>\n\n<dl class=\"method\">\n<dt id=\"potrace.Curve.tesselate\">\n<tt class=\"descname\">tesselate</tt><big>(</big><span class=\"optional\">[</span><em>method</em>, <em>res</em><span class=\"optional\">]</span><big>)</big><a class=\"headerlink\" href=\"#potrace.Curve.tesselate\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Tesselate the curve.</p>\n<p>Returns a numpy array containing the curve vertices. The <em>method</em>\nargument is for selecting the bezier segments tesselation method:\n<a title=\"potrace.Curve.adaptive\" class=\"reference internal\" href=\"#potrace.Curve.adaptive\"><tt class=\"xref docutils literal\"><span class=\"pre\">adaptive</span></tt></a> (the default) uses an adaptive tesselation algorithm\nand <a title=\"potrace.Curve.regular\" class=\"reference internal\" href=\"#potrace.Curve.regular\"><tt class=\"xref docutils literal\"><span class=\"pre\">regular</span></tt></a> divides the segments with a fixed number of steps\n(controled by the <em>res</em> argument).</p>\n</dd></dl>\n\n</dd></dl>\n\n<p>There are two types of segments, <a title=\"potrace.BezierSegment\" class=\"reference internal\" href=\"#potrace.BezierSegment\"><tt class=\"xref docutils literal\"><span class=\"pre\">BezierSegment</span></tt></a>:</p>\n<img alt=\"_images/bezier.png\" src=\"_images/bezier.png\" />\n<p>and <a title=\"potrace.CornerSegment\" class=\"reference internal\" href=\"#potrace.CornerSegment\"><tt class=\"xref docutils literal\"><span class=\"pre\">CornerSegment</span></tt></a>:</p>\n<img alt=\"_images/corner.png\" src=\"_images/corner.png\" />\n<p>Since curves are always closed, segments only store their control points and\nend point; their starting point is always the previous segment&#8217;s end point. You\ncan check the <tt class=\"xref docutils literal\"><span class=\"pre\">is_corner</span></tt> attribute to determine the segments type easily.</p>\n<dl class=\"class\">\n<dt id=\"potrace.BezierSegment\">\n<em class=\"property\">class </em><tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">BezierSegment</tt><a class=\"headerlink\" href=\"#potrace.BezierSegment\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Represents a Bezier segment in a <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> object.</p>\n<dl class=\"attribute\">\n<dt id=\"potrace.BezierSegment.c1\">\n<tt class=\"descname\">c1</tt><a class=\"headerlink\" href=\"#potrace.BezierSegment.c1\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The segment&#8217;s starting point control point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.BezierSegment.c2\">\n<tt class=\"descname\">c2</tt><a class=\"headerlink\" href=\"#potrace.BezierSegment.c2\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The segment&#8217;s end point control point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.BezierSegment.end_point\">\n<tt class=\"descname\">end_point</tt><a class=\"headerlink\" href=\"#potrace.BezierSegment.end_point\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The segment&#8217;s end point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.BezierSegment.is_corner\">\n<tt class=\"descname\">is_corner</tt><a class=\"headerlink\" href=\"#potrace.BezierSegment.is_corner\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>Always <tt class=\"xref xref docutils literal\"><span class=\"pre\">False</span></tt>.</dd></dl>\n\n</dd></dl>\n\n<dl class=\"class\">\n<dt id=\"potrace.CornerSegment\">\n<em class=\"property\">class </em><tt class=\"descclassname\">potrace.</tt><tt class=\"descname\">CornerSegment</tt><a class=\"headerlink\" href=\"#potrace.CornerSegment\" title=\"Permalink to this definition\">¶</a></dt>\n<dd><p>Represents a corner segment in a <a title=\"potrace.Curve\" class=\"reference internal\" href=\"#potrace.Curve\"><tt class=\"xref docutils literal\"><span class=\"pre\">Curve</span></tt></a> object.</p>\n<dl class=\"attribute\">\n<dt id=\"potrace.CornerSegment.c\">\n<tt class=\"descname\">c</tt><a class=\"headerlink\" href=\"#potrace.CornerSegment.c\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The segment&#8217;s corner point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.CornerSegment.end_point\">\n<tt class=\"descname\">end_point</tt><a class=\"headerlink\" href=\"#potrace.CornerSegment.end_point\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>The segment&#8217;s end point.</dd></dl>\n\n<dl class=\"attribute\">\n<dt id=\"potrace.CornerSegment.is_corner\">\n<tt class=\"descname\">is_corner</tt><a class=\"headerlink\" href=\"#potrace.CornerSegment.is_corner\" title=\"Permalink to this definition\">¶</a></dt>\n<dd>Always <tt class=\"xref xref docutils literal\"><span class=\"pre\">True</span></tt>.</dd></dl>\n\n</dd></dl>\n\n</div>\n</div>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h3><a href=\"index.html\">Table Of Contents</a></h3>\n  <ul>\n<li><a class=\"reference external\" href=\"#\"><tt class=\"docutils literal\"><span class=\"pre\">potrace</span></tt> &#8211; API reference</a><ul>\n<li><a class=\"reference external\" href=\"#bitmap-objects\">Bitmap objects</a></li>\n<li><a class=\"reference external\" href=\"#path-objects\">Path objects</a></li>\n<li><a class=\"reference external\" href=\"#curve-objects\">Curve objects</a></li>\n</ul>\n</li>\n</ul>\n\n  <h4>Previous topic</h4>\n  <p class=\"topless\"><a href=\"tutorial.html\"\n                        title=\"previous chapter\">Tutorial</a></p>\n  <h3>This Page</h3>\n  <ul class=\"this-page-menu\">\n    <li><a href=\"_sources/ref.txt\"\n           rel=\"nofollow\">Show Source</a></li>\n  </ul>\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" size=\"18\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"tutorial.html\" title=\"Tutorial\"\n             >previous</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "doc/_build/html/search.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Search &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/searchtools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"index.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <h1 id=\"search-documentation\">Search</h1>\n  <div id=\"fallback\" class=\"admonition warning\">\n  <script type=\"text/javascript\">$('#fallback').hide();</script>\n  <p>\n    Please activate JavaScript to enable the search\n    functionality.\n  </p>\n  </div>\n  <p>\n    From here you can search these documents. Enter your search\n    words into the box below and click \"search\". Note that the search\n    function will automatically search for all of the words. Pages\n    containing fewer words won't appear in the result list.\n  </p>\n  <form action=\"\" method=\"get\">\n    <input type=\"text\" name=\"q\" value=\"\" />\n    <input type=\"submit\" value=\"search\" />\n    <span id=\"search-progress\" style=\"padding-left: 10px\"></span>\n  </form>\n  \n  <div id=\"search-results\">\n  \n  </div>\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n  \n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  <script type=\"text/javascript\" src=\"searchindex.js\"></script>\n\n  </body>\n</html>"
  },
  {
    "path": "doc/_build/html/searchindex.js",
    "content": "Search.setIndex({desctypes:{\"0\":\"data\",\"1\":\"class\",\"2\":\"attribute\",\"3\":\"function\",\"4\":\"method\"},terms:{represent:1,all:1,less:1,api:[0,1],over:2,turnpolicy_whit:1,bitmap:[0,1,2],threshold:1,corner:1,accuraci:1,children:1,paramet:1,current:1,onli:1,middl:2,how:1,polici:1,fix:1,alphamax:1,should:1,black:1,els:2,main:2,local:1,pixel:1,non:1,liter:1,\"return\":1,greater:1,python:0,rectangl:2,util:0,print:2,background:1,turnpolicy_black:1,turnpolicy_right:1,pypotrac:[0,2],choic:1,pre:1,level:1,docutil:1,potrac:[0,1,2],list:1,resolv:1,iter:2,method:[1,2],turnpolici:1,vector:[0,1],contain:1,flag:1,refer:[0,1],page:0,right:1,neighborhood:1,transform:0,tree:1,zero:[1,2],result:1,is_corn:[1,2],pass:2,close:1,librari:1,nonzero:1,index:0,detect:1,turnpolicy_minor:1,c1_x:2,bind:0,potracelib_vers:1,tend:1,content:0,version:1,adapt:1,intersect:1,between:1,c1_y:2,\"import\":[1,2],uint32:2,attribut:1,foreground:1,object:[0,1,2],themselv:1,parent:1,whose:1,each:1,infin:1,here:2,step:1,although:1,path:[0,1,2],vertic:1,sinc:1,interpret:1,convert:[1,2],guarante:1,larger:1,keep:1,turn:1,amount:1,instanc:1,constructor:[1,2],whole:1,frequent:1,determin:1,control:1,rang:1,point:1,color:1,numpi:[1,2],arrai:[1,2],progress_func:1,prefer:1,number:1,compos:1,\"boolean\":1,wrap:1,constant:1,curves_tre:1,select:1,given:1,span:1,would:1,area:1,data:[1,2],top:1,hardli:1,two:1,least:1,compon:1,start:1,turdsiz:1,valu:1,call:2,white:1,type:1,\"final\":1,store:1,more:1,from:[1,2],imag:[0,1],search:0,decomposit:1,bmp:2,enclos:1,indic:0,c2_x:2,c2_y:2,c_y:2,c_x:2,line:1,\"true\":1,than:1,opttoler:1,made:1,possibl:1,whether:1,remov:1,simplif:1,smooth:1,can:1,defin:1,below:1,turnpolicy_major:1,error:1,posit:1,modul:0,purpos:1,connect:1,randomli:1,pil:1,have:1,creat:[1,2],dure:1,argument:1,end_point_x:2,repres:1,\"default\":1,good:1,decreas:1,turnpolicy_random:1,tabl:0,occur:1,bezierseg:1,alwai:1,turnpolicy_left:1,cornerseg:1,end:1,polygon:1,divid:1,end_point:[1,2],make:2,bezier:1,check:1,fals:1,other:1,take:1,which:1,you:[1,2],document:0,simpl:2,simplifi:1,curv:[0,1,2],thi:1,trace:[1,2],despeckl:1,optim:1,previou:1,most:1,attempt:1,regular:1,initi:1,tessel:1,easili:1,segment:[1,2],\"class\":[1,2],reduc:1,off:1,practic:1,algorithm:1,tutori:[0,2],start_point:[1,2],space:1,opticurv:1,visual:1,ambigu:1,tradeoff:1,exampl:[1,2],end_point_i:2,expens:1,allow:1,choos:1,left:1},titles:[\"pypotrace documentation\",\"<tt class=\\\"docutils literal\\\"><span class=\\\"pre\\\">potrace</span></tt> &#8211; API reference\",\"Tutorial\"],modules:{potrace:1},descrefs:{potrace:{TURNPOLICY_LEFT:[1,0],BezierSegment:[1,1],Path:[1,1],CornerSegment:[1,1],Curve:[1,1],Bitmap:[1,1],TURNPOLICY_RIGHT:[1,0],potracelib_version:[1,3],TURNPOLICY_RANDOM:[1,0],TURNPOLICY_BLACK:[1,0],TURNPOLICY_MAJORITY:[1,0],TURNPOLICY_MINORITY:[1,0],TURNPOLICY_WHITE:[1,0]},\"potrace.CornerSegment\":{end_point:[1,2],c:[1,2],is_corner:[1,2]},\"potrace.Curve\":{segments:[1,2],regular:[1,2],tesselate:[1,4],adaptive:[1,2],start_point:[1,2],children:[1,2]},\"potrace.BezierSegment\":{end_point:[1,2],c1:[1,2],c2:[1,2],is_corner:[1,2]},\"potrace.Path\":{curves_tree:[1,2],curves:[1,2]},\"potrace.Bitmap\":{trace:[1,4]}},filenames:[\"index\",\"ref\",\"tutorial\"]})"
  },
  {
    "path": "doc/_build/html/tutorial.html",
    "content": "\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n    \n    <title>Tutorial &mdash; potrace v0.1 documentation</title>\n    <link rel=\"stylesheet\" href=\"_static/default.css\" type=\"text/css\" />\n    <link rel=\"stylesheet\" href=\"_static/pygments.css\" type=\"text/css\" />\n    <script type=\"text/javascript\">\n      var DOCUMENTATION_OPTIONS = {\n        URL_ROOT:    '#',\n        VERSION:     '0.1',\n        COLLAPSE_MODINDEX: false,\n        FILE_SUFFIX: '.html',\n        HAS_SOURCE:  true\n      };\n    </script>\n    <script type=\"text/javascript\" src=\"_static/jquery.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/underscore.js\"></script>\n    <script type=\"text/javascript\" src=\"_static/doctools.js\"></script>\n    <link rel=\"top\" title=\"potrace v0.1 documentation\" href=\"index.html\" />\n    <link rel=\"next\" title=\"potrace – API reference\" href=\"ref.html\" />\n    <link rel=\"prev\" title=\"pypotrace documentation\" href=\"index.html\" /> \n  </head>\n  <body>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             accesskey=\"I\">index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             accesskey=\"M\">modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"ref.html\" title=\"potrace – API reference\"\n             accesskey=\"N\">next</a> |</li>\n        <li class=\"right\" >\n          <a href=\"index.html\" title=\"pypotrace documentation\"\n             accesskey=\"P\">previous</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>  \n\n    <div class=\"document\">\n      <div class=\"documentwrapper\">\n        <div class=\"bodywrapper\">\n          <div class=\"body\">\n            \n  <div class=\"section\" id=\"tutorial\">\n<h1>Tutorial<a class=\"headerlink\" href=\"#tutorial\" title=\"Permalink to this headline\">¶</a></h1>\n<p>Here is a simple example using pypotrace:</p>\n<div class=\"highlight-python\"><div class=\"highlight\"><pre><span class=\"kn\">import</span> <span class=\"nn\">potrace</span>\n\n<span class=\"c\"># Make a numpy array with a rectangle in the middle</span>\n<span class=\"n\">data</span> <span class=\"o\">=</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">zeros</span><span class=\"p\">((</span><span class=\"mi\">32</span><span class=\"p\">,</span> <span class=\"mi\">32</span><span class=\"p\">),</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">uint32</span><span class=\"p\">)</span>\n<span class=\"n\">data</span><span class=\"p\">[</span><span class=\"mi\">8</span><span class=\"p\">:</span><span class=\"mi\">32</span><span class=\"o\">-</span><span class=\"mi\">8</span><span class=\"p\">,</span> <span class=\"mi\">8</span><span class=\"p\">:</span><span class=\"mi\">32</span><span class=\"o\">-</span><span class=\"mi\">8</span><span class=\"p\">]</span> <span class=\"o\">=</span> <span class=\"mi\">1</span>\n\n<span class=\"c\"># Create a bitmap from the array</span>\n<span class=\"n\">bmp</span> <span class=\"o\">=</span> <span class=\"n\">potrace</span><span class=\"o\">.</span><span class=\"n\">Bitmap</span><span class=\"p\">(</span><span class=\"n\">data</span><span class=\"p\">)</span>\n\n<span class=\"c\"># Trace the bitmap to a path</span>\n<span class=\"n\">path</span> <span class=\"o\">=</span> <span class=\"n\">bmp</span><span class=\"o\">.</span><span class=\"n\">trace</span><span class=\"p\">()</span>\n\n<span class=\"c\"># Iterate over path curves</span>\n<span class=\"k\">for</span> <span class=\"n\">curve</span> <span class=\"ow\">in</span> <span class=\"n\">path</span><span class=\"p\">:</span>\n    <span class=\"k\">print</span> <span class=\"s\">&quot;start_point =&quot;</span><span class=\"p\">,</span> <span class=\"n\">curve</span><span class=\"o\">.</span><span class=\"n\">start_point</span>\n    <span class=\"k\">for</span> <span class=\"n\">segment</span> <span class=\"ow\">in</span> <span class=\"n\">curve</span><span class=\"p\">:</span>\n        <span class=\"k\">print</span> <span class=\"n\">segment</span>\n        <span class=\"n\">end_point_x</span><span class=\"p\">,</span> <span class=\"n\">end_point_y</span> <span class=\"o\">=</span> <span class=\"n\">segment</span><span class=\"o\">.</span><span class=\"n\">end_point</span>\n        <span class=\"k\">if</span> <span class=\"n\">segment</span><span class=\"o\">.</span><span class=\"n\">is_corner</span><span class=\"p\">:</span>\n            <span class=\"n\">c_x</span><span class=\"p\">,</span> <span class=\"n\">c_y</span> <span class=\"o\">=</span> <span class=\"n\">segment</span><span class=\"o\">.</span><span class=\"n\">c</span>\n        <span class=\"k\">else</span><span class=\"p\">:</span>\n            <span class=\"n\">c1_x</span><span class=\"p\">,</span> <span class=\"n\">c1_y</span> <span class=\"o\">=</span> <span class=\"n\">segment</span><span class=\"o\">.</span><span class=\"n\">c1</span>\n            <span class=\"n\">c2_x</span><span class=\"p\">,</span> <span class=\"n\">c2_y</span> <span class=\"o\">=</span> <span class=\"n\">segment</span><span class=\"o\">.</span><span class=\"n\">c2</span>\n</pre></div>\n</div>\n<p>The main class is <a title=\"potrace.Bitmap\" class=\"reference external\" href=\"ref.html#potrace.Bitmap\"><tt class=\"xref docutils literal\"><span class=\"pre\">Bitmap</span></tt></a>. You pass its constructor a 2D numpy array,\nand you call its <a title=\"potrace.Bitmap.trace\" class=\"reference external\" href=\"ref.html#potrace.Bitmap.trace\"><tt class=\"xref docutils literal\"><span class=\"pre\">trace()</span></tt></a> method to convert it to a\n<a title=\"potrace.Path\" class=\"reference external\" href=\"ref.html#potrace.Path\"><tt class=\"xref docutils literal\"><span class=\"pre\">Path</span></tt></a> object.</p>\n</div>\n\n\n          </div>\n        </div>\n      </div>\n      <div class=\"sphinxsidebar\">\n        <div class=\"sphinxsidebarwrapper\">\n  <h4>Previous topic</h4>\n  <p class=\"topless\"><a href=\"index.html\"\n                        title=\"previous chapter\">pypotrace documentation</a></p>\n  <h4>Next topic</h4>\n  <p class=\"topless\"><a href=\"ref.html\"\n                        title=\"next chapter\"><tt class=\"docutils literal docutils literal\"><span class=\"pre\">potrace</span></tt> &#8211; API reference</a></p>\n  <h3>This Page</h3>\n  <ul class=\"this-page-menu\">\n    <li><a href=\"_sources/tutorial.txt\"\n           rel=\"nofollow\">Show Source</a></li>\n  </ul>\n<div id=\"searchbox\" style=\"display: none\">\n  <h3>Quick search</h3>\n    <form class=\"search\" action=\"search.html\" method=\"get\">\n      <input type=\"text\" name=\"q\" size=\"18\" />\n      <input type=\"submit\" value=\"Go\" />\n      <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n      <input type=\"hidden\" name=\"area\" value=\"default\" />\n    </form>\n    <p class=\"searchtip\" style=\"font-size: 90%\">\n    Enter search terms or a module, class or function name.\n    </p>\n</div>\n<script type=\"text/javascript\">$('#searchbox').show(0);</script>\n        </div>\n      </div>\n      <div class=\"clearer\"></div>\n    </div>\n    <div class=\"related\">\n      <h3>Navigation</h3>\n      <ul>\n        <li class=\"right\" style=\"margin-right: 10px\">\n          <a href=\"genindex.html\" title=\"General Index\"\n             >index</a></li>\n        <li class=\"right\" >\n          <a href=\"modindex.html\" title=\"Global Module Index\"\n             >modules</a> |</li>\n        <li class=\"right\" >\n          <a href=\"ref.html\" title=\"potrace – API reference\"\n             >next</a> |</li>\n        <li class=\"right\" >\n          <a href=\"index.html\" title=\"pypotrace documentation\"\n             >previous</a> |</li>\n        <li><a href=\"index.html\">potrace v0.1 documentation</a> &raquo;</li> \n      </ul>\n    </div>\n    <div class=\"footer\">\n        &copy; Copyright 2010, Luper Rouch.\n      Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> 1.0.\n    </div>\n  </body>\n</html>"
  },
  {
    "path": "doc/conf.py",
    "content": "# -*- coding: utf-8 -*-\n#\n# potrace documentation build configuration file, created by\n# sphinx-quickstart on Sat Apr 10 10:46:52 2010.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport sys, os\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#sys.path.append(os.path.abspath('.'))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = ['sphinx.ext.autodoc']\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n#source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'potrace'\ncopyright = u'2010, Luper Rouch'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = '0.1'\n# The full version, including alpha/beta/rc tags.\nrelease = '0.1'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n#today = ''\n# Else, today_fmt is used as the format for a strftime call.\n#today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = ['_build']\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  Major themes that come with\n# Sphinx are currently 'default' and 'sphinxdoc'.\nhtml_theme = 'default'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_use_modindex = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# If nonempty, this is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = ''\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'potracedoc'\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n#latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n#latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n  ('index', 'potrace.tex', u'potrace Documentation',\n   u'Luper Rouch', 'manual'),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# Additional stuff for the LaTeX preamble.\n#latex_preamble = ''\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_use_modindex = True\n\n\n# -- Options for Epub output ---------------------------------------------------\n\n# Bibliographic Dublin Core info.\n#epub_title = ''\n#epub_author = ''\n#epub_publisher = ''\n#epub_copyright = ''\n\n# The language of the text. It defaults to the language option\n# or en if the language is not set.\n#epub_language = ''\n\n# The scheme of the identifier. Typical schemes are ISBN or URL.\n#epub_scheme = ''\n\n# The unique identifier of the text. This can be a ISBN number\n# or the project homepage.\n#epub_identifier = ''\n\n# A unique identification for the text.\n#epub_uid = ''\n\n# HTML files that should be inserted before the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_pre_files = []\n\n# HTML files shat should be inserted after the pages created by sphinx.\n# The format is a list of tuples containing the path and title.\n#epub_post_files = []\n\n# A list of files that should not be packed into the epub file.\n#epub_exclude_files = []\n"
  },
  {
    "path": "doc/index.rst",
    "content": "pypotrace documentation\n=======================\n\npypotrace are Python bindings for `potrace`_, an utility to transform bitmap\nimages into vector images.\n\n.. _potrace: http://potrace.sourceforge.net/\n\nContents:\n\n.. toctree::\n   :maxdepth: 2\n\n   tutorial\n   ref\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n\n"
  },
  {
    "path": "doc/make.bat",
    "content": "@ECHO OFF\n\nREM Command file for Sphinx documentation\n\nset SPHINXBUILD=sphinx-build\nset BUILDDIR=_build\nset ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .\nif NOT \"%PAPER%\" == \"\" (\n\tset ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%\n)\n\nif \"%1\" == \"\" goto help\n\nif \"%1\" == \"help\" (\n\t:help\n\techo.Please use `make ^<target^>` where ^<target^> is one of\n\techo.  html       to make standalone HTML files\n\techo.  dirhtml    to make HTML files named index.html in directories\n\techo.  singlehtml to make a single large HTML file\n\techo.  pickle     to make pickle files\n\techo.  json       to make JSON files\n\techo.  htmlhelp   to make HTML files and a HTML help project\n\techo.  qthelp     to make HTML files and a qthelp project\n\techo.  devhelp    to make HTML files and a Devhelp project\n\techo.  epub       to make an epub\n\techo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter\n\techo.  changes    to make an overview over all changed/added/deprecated items\n\techo.  linkcheck  to check all external links for integrity\n\techo.  doctest    to run all doctests embedded in the documentation if enabled\n\tgoto end\n)\n\nif \"%1\" == \"clean\" (\n\tfor /d %%i in (%BUILDDIR%\\*) do rmdir /q /s %%i\n\tdel /q /s %BUILDDIR%\\*\n\tgoto end\n)\n\nif \"%1\" == \"html\" (\n\t%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/html.\n\tgoto end\n)\n\nif \"%1\" == \"dirhtml\" (\n\t%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.\n\tgoto end\n)\n\nif \"%1\" == \"singlehtml\" (\n\t%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml\n\techo.\n\techo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.\n\tgoto end\n)\n\nif \"%1\" == \"pickle\" (\n\t%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle\n\techo.\n\techo.Build finished; now you can process the pickle files.\n\tgoto end\n)\n\nif \"%1\" == \"json\" (\n\t%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json\n\techo.\n\techo.Build finished; now you can process the JSON files.\n\tgoto end\n)\n\nif \"%1\" == \"htmlhelp\" (\n\t%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp\n\techo.\n\techo.Build finished; now you can run HTML Help Workshop with the ^\n.hhp project file in %BUILDDIR%/htmlhelp.\n\tgoto end\n)\n\nif \"%1\" == \"qthelp\" (\n\t%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp\n\techo.\n\techo.Build finished; now you can run \"qcollectiongenerator\" with the ^\n.qhcp project file in %BUILDDIR%/qthelp, like this:\n\techo.^> qcollectiongenerator %BUILDDIR%\\qthelp\\potrace.qhcp\n\techo.To view the help file:\n\techo.^> assistant -collectionFile %BUILDDIR%\\qthelp\\potrace.ghc\n\tgoto end\n)\n\nif \"%1\" == \"devhelp\" (\n\t%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% _build/devhelp\n\techo.\n\techo.Build finished.\n\tgoto end\n)\n\nif \"%1\" == \"epub\" (\n\t%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub\n\techo.\n\techo.Build finished. The epub file is in %BUILDDIR%/epub.\n\tgoto end\n)\n\nif \"%1\" == \"latex\" (\n\t%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex\n\techo.\n\techo.Build finished; the LaTeX files are in %BUILDDIR%/latex.\n\tgoto end\n)\n\nif \"%1\" == \"changes\" (\n\t%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes\n\techo.\n\techo.The overview file is in %BUILDDIR%/changes.\n\tgoto end\n)\n\nif \"%1\" == \"linkcheck\" (\n\t%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck\n\techo.\n\techo.Link check complete; look for any errors in the above output ^\nor in %BUILDDIR%/linkcheck/output.txt.\n\tgoto end\n)\n\nif \"%1\" == \"doctest\" (\n\t%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest\n\techo.\n\techo.Testing of doctests in the sources finished, look at the ^\nresults in %BUILDDIR%/doctest/output.txt.\n\tgoto end\n)\n\n:end\n"
  },
  {
    "path": "doc/ref.rst",
    "content": ":mod:`potrace` -- API reference\n===============================\n\n.. module:: potrace\n\n.. autofunction:: potracelib_version\n\nConstants for :meth:`Bitmap.trace` *turnpolicy* parameter:\n\n.. data:: TURNPOLICY_BLACK\n.. data:: TURNPOLICY_WHITE\n.. data:: TURNPOLICY_LEFT\n.. data:: TURNPOLICY_RIGHT\n.. data:: TURNPOLICY_MINORITY\n.. data:: TURNPOLICY_MAJORITY\n.. data:: TURNPOLICY_RANDOM\n\n\nBitmap objects\n--------------\n\nYou start a trace by creating a :class:`Bitmap` instance, e.g.::\n\n    from potrace import Bitmap\n\n    # Initialize data, for example convert a PIL image to a numpy array\n    # [...]\n\n    bitmap = Bitmap(data)\n    path = bitmap.trace()\n\n.. autoclass:: Bitmap(data)\n   \n   .. automethod:: trace([turdsize, turnpolicy, alphamax, opticurve, opttolerance])\n\n\nPath objects\n------------\n\n:meth:`Bitmap.trace` returns a :class:`Path` instance, containing the whole\nvectorized image.\n\n.. autoclass:: Path\n\n   .. attribute:: curves\n      \n      The list of :class:`Curve` objects composing the path.\n\n   .. attribute:: curves_tree\n\n      The top level :class:`Curve` objects in the tree representation of the\n      path.\n\n\nCurve objects\n-------------\n\n:class:`Path` objects are made of one or more of :class:`Curve` objects,\nwhich are themselves composed of a list of segments.\n\nCurves can have children curves. Children curves are guaranteed to be enclosed\nby their parent.\n\n.. autoclass:: Curve\n\n   .. attribute:: regular\n   .. attribute:: adaptive\n\n      Constants for the :meth:`tesselate` method.\n\n   .. autoattribute:: start_point\n\n   .. attribute:: segments\n\n      The list of segment objects that compose the curve.\n\n   .. attribute:: children\n\n      The list of children curves.\n\n   .. automethod:: tesselate([method, res])\n\nThere are two types of segments, :class:`BezierSegment`:\n\n.. image:: _static/bezier.png\n\nand :class:`CornerSegment`:\n\n.. image:: _static/corner.png\n\nSince curves are always closed, segments only store their control points and\nend point; their starting point is always the previous segment's end point. You\ncan check the :attr:`is_corner` attribute to determine the segments type easily.\n\n\n.. autoclass:: BezierSegment\n    \n   .. attribute:: c1\n\n      The segment's starting point control point.\n\n   .. attribute:: c2\n    \n      The segment's end point control point.\n\n   .. attribute:: end_point\n      \n      The segment's end point.\n\n   .. attribute:: is_corner\n\n      Always :const:`False`.\n\n\n.. autoclass:: CornerSegment\n\n   .. attribute:: c\n\n      The segment's corner point.\n\n   .. attribute:: end_point\n      \n      The segment's end point.\n\n   .. attribute:: is_corner\n\n      Always :const:`True`.\n"
  },
  {
    "path": "doc/tutorial.rst",
    "content": "Tutorial\n========\n\n.. currentmodule:: potrace\n\nHere is a simple example using pypotrace::\n\n    import potrace\n\n    # Make a numpy array with a rectangle in the middle\n    data = np.zeros((32, 32), np.uint32)\n    data[8:32-8, 8:32-8] = 1\n\n    # Create a bitmap from the array\n    bmp = potrace.Bitmap(data)\n\n    # Trace the bitmap to a path\n    path = bmp.trace()\n    \n    # Iterate over path curves\n    for curve in path:\n        print \"start_point =\", curve.start_point\n        for segment in curve:\n            print segment\n            end_point_x, end_point_y = segment.end_point\n            if segment.is_corner:\n                c_x, c_y = segment.c\n            else:\n                c1_x, c1_y = segment.c1\n                c2_x, c2_y = segment.c2\n\n\nThe main class is :class:`Bitmap`. You pass its constructor a 2D numpy array,\nand you call its :meth:`trace() <Bitmap.trace>` method to convert it to a\n:class:`Path` object.\n"
  },
  {
    "path": "potrace/.gitignore",
    "content": "*.so\n"
  },
  {
    "path": "potrace/__init__.py",
    "content": "from potrace._potrace import *  # NOQA\n\n\n__version__ = \"0.2\"\n"
  },
  {
    "path": "potrace/_potrace.pxd",
    "content": "cdef extern from \"potracelib.h\":\n\n    int POTRACE_TURNPOLICY_BLACK\n    int POTRACE_TURNPOLICY_WHITE\n    int POTRACE_TURNPOLICY_LEFT\n    int POTRACE_TURNPOLICY_RIGHT\n    int POTRACE_TURNPOLICY_MINORITY\n    int POTRACE_TURNPOLICY_MAJORITY\n    int POTRACE_TURNPOLICY_RANDOM\n\n    int POTRACE_CURVETO\n    int POTRACE_CORNER\n\n    int POTRACE_STATUS_OK\n    int POTRACE_STATUS_INCOMPLETE\n\n    ctypedef unsigned long potrace_word\n    \n    struct potrace_progress_s:\n        void (*callback)(double progress, void *privdata)\n        void *data\n        double min, max\n        double epsilon\n\n    struct potrace_param_s:\n        int turdsize\n        int turnpolicy\n        double alphamax\n        int opticurve\n        double opttolerance\n        potrace_progress_s progress\n\n    struct potrace_bitmap_s:\n        int w, h\n        int dy\n        potrace_word *map\n\n    struct potrace_dpoint_s:\n        double x, y\n    \n    struct potrace_curve_s:\n        int n\n        int *tag\n        potrace_dpoint_s *c[3]\n    \n    struct potrace_path_s:\n        int area              \n        int sign                         \n        potrace_curve_s curve\n        potrace_path_s *next\n        potrace_path_s *childlist \n        potrace_path_s *sibling   \n        void *priv\n\n    struct potrace_state_s:\n        int status                       \n        potrace_path_s *plist\n        void *priv \n\n    potrace_param_s *potrace_param_default()\n    void potrace_param_free(potrace_param_s *p)\n    potrace_state_s *potrace_trace(potrace_param_s *param, \n            potrace_bitmap_s *bm)\n    void potrace_state_free(potrace_state_s *st)\n    char *potrace_version()\n"
  },
  {
    "path": "potrace/_potrace.pyx",
    "content": "cimport libc.stdlib\ncimport cpython.bytes\ncimport numpy as np\nfrom potrace.bezier cimport adaptive_bezier, bezier\n\n\nimport numpy as np\n\ncdef extern from \"stdbool.h\":\n    ctypedef unsigned short bool\n\n# Number of pixels in a word\ncdef int N = sizeof(potrace_word) * 8\n\n# Constants\nTURNPOLICY_BLACK = POTRACE_TURNPOLICY_BLACK\nTURNPOLICY_WHITE = POTRACE_TURNPOLICY_WHITE\nTURNPOLICY_LEFT = POTRACE_TURNPOLICY_LEFT\nTURNPOLICY_RIGHT = POTRACE_TURNPOLICY_RIGHT\nTURNPOLICY_MINORITY = POTRACE_TURNPOLICY_MINORITY\nTURNPOLICY_MAJORITY = POTRACE_TURNPOLICY_MAJORITY\nTURNPOLICY_RANDOM = POTRACE_TURNPOLICY_RANDOM\n\n\nclass PotraceError(Exception): pass\n\n\ncdef class Bitmap:\n    \"\"\"\n    Create a Bitmap instance.\n\n    The constructor *data* argument should be a 2D numpy array containing pixel\n    data. Pixels are only interpreted as zero or nonzero.\n    \"\"\"\n\n    cdef np.ndarray _data\n    cdef potrace_bitmap_s po_bitmap\n\n    def __init__(self, data):\n        self.data = data\n\n    def __cinit__(self):\n        self.po_bitmap.map = NULL\n\n    def __dealloc__(self):\n        self.free_bitmap()\n\n    def trace(self, turdsize=2, turnpolicy=POTRACE_TURNPOLICY_MINORITY,\n            alphamax=1.0, opticurve=1, opttolerance=0.2):\n        \"\"\"\n        Trace the bitmap and wrap the result in a :class:`Path` instance.\n\n        The *turdsize* parameter can be used to \"despeckle\" the bitmap to be\n        traced, by removing all curves whose enclosed area is below the given\n        threshold. The current default for the *turdsize* parameter is 2; its\n        useful range is from 0 to infinity.\n\n        The *turnpolicy* parameter determines how to resolve ambiguities during\n        decomposition of bitmaps into paths. The possible choices for the\n        *turnpolicy* parameter are:\n        \n        * :const:`TURNPOLICY_BLACK`: prefers to connect black\n          (foreground) components.\n\n        * :const:`TURNPOLICY_WHITE`: prefers to connect white\n          (background) components.\n        \n        * :const:`TURNPOLICY_LEFT`: always take a left turn.\n\n        * :const:`TURNPOLICY_RIGHT`: always take a right turn.\n\n        * :const:`TURNPOLICY_MINORITY`: prefers to connect the color\n          (black or white) that occurs least frequently in a local neighborhood\n          of the current position.\n\n        * :const:`TURNPOLICY_MAJORITY`: prefers to connect the color \n          (black or white) that occurs most frequently in a local neighborhood\n          of the current position.\n\n        * :const:`TURNPOLICY_RANDOM`: choose randomly.\n        \n        The current default policy is :const:`TURNPOLICY_MINORITY`, which tends\n        to keep visual lines connected.\n\n        The *alphamax* parameter is a threshold for the detection of corners.\n        It controls the smoothness of the traced curve. The current default is\n        1.0; useful range of this parameter is from 0.0 (polygon) to 1.3333\n        (no corners).\n\n        The *opticurve* parameter is a boolean flag that controls whether\n        Potrace will attempt to \"simplify\" the final curve by reducing the\n        number of Bezier curve segments.  Opticurve=1 turns on optimization,\n        and *opticurve=0* turns it off. The current default is on.\n\n        The *opttolerance* parameter defines the amount of error allowed in\n        this simplification. The current default is 0.2. Larger values tend to\n        decrease the number of segments, at the expense of less accuracy. The\n        useful range is from 0 to infinity, although in practice one would\n        hardly choose values greater than 1 or so. For most purposes, the\n        default value is a good tradeoff between space and accuracy.\n        \"\"\"\n        cdef Parameters params = Parameters(turdsize=turdsize,\n                turnpolicy=turnpolicy, alphamax=alphamax, opticurve=opticurve,\n                opttolerance=opttolerance)\n        # Trace bitmap\n        ret = state_from_ptr(potrace_trace(params.po_params, &self.po_bitmap))\n        if not ret.ok:\n            raise PotraceError(\"error tracing bitmap\")\n        return ret.image\n\n    property data:\n        def __get__(self):\n            return self._data\n\n        def __set__(self, np.ndarray value not None):\n            cdef int x, y\n            self._data = value\n            # Init potrace bitmap struct\n            self.po_bitmap.w = self._data.shape[1]\n            self.po_bitmap.h = self._data.shape[0]\n            self.po_bitmap.dy = (self.po_bitmap.w + (\n                (N - (self.po_bitmap.w & (N - 1))) & (N - 1))) // N\n            # Allocate bitmap buffer\n            size = self.po_bitmap.h * self.po_bitmap.dy * sizeof(potrace_word)\n            self.free_bitmap()\n            self.po_bitmap.map = <potrace_word*>libc.stdlib.malloc(size)\n            # Initialize bitmap buffer from numpy array\n            for y in range(self.po_bitmap.h):\n                for x in range(self.po_bitmap.w):\n                    setpixel(&self.po_bitmap, x, y, <bool>self._data[y, x])\n\n    cdef free_bitmap(self):\n        if self.po_bitmap.map != NULL:\n            libc.stdlib.free(self.po_bitmap.map)\n\n\ncdef class Parameters:\n    \"\"\"\n    Stores parameters for the potrace_trace function.\n    \"\"\"\n    \n    cdef potrace_param_s *po_params\n\n    def __cinit__(self, int turdsize=2, \n            int turnpolicy=POTRACE_TURNPOLICY_MINORITY, double alphamax=1.0, \n            int opticurve=1, double opttolerance=0.2, *args, **kwargs):\n        self.po_params = potrace_param_default()\n        self.po_params.turdsize = turdsize\n        self.po_params.turnpolicy = turnpolicy\n        self.po_params.alphamax = alphamax\n        self.po_params.opticurve = opticurve\n        self.po_params.opttolerance = opttolerance\n\n    def __dealloc__(self):\n        potrace_param_free(self.po_params)\n\n\ncdef class State:\n    \"\"\"\n    Stores a potrace state struct.\n\n    Normally created with the :func:`state_from_ptr` function.\n    \"\"\"\n\n    cdef potrace_state_s *po_state\n\n    def __cinit__(self):\n        self.po_state = NULL\n\n    def __dealloc__(self):\n        if self.po_state != NULL:\n            potrace_state_free(self.po_state)\n\n    property ok:\n        \"\"\"\n        This property is true if this State object stores a successful\n        operation.\n        \"\"\"\n\n        def __get__(self):\n            if self.po_state == NULL:\n                raise ValueError(\"can't query null state object\")\n            return self.po_state.status == POTRACE_STATUS_OK\n\n    property image:\n        \"\"\"\n        This property returns a Path containing a copy of this state's data.\n        \"\"\"\n\n        def __get__(self):\n            if not self.ok:\n                raise ValueError(\"can't access the image property of \"\n                        \"an incomplete trace state\")\n            return path_from_ptr(self.po_state.plist);            \n\n\ncdef class BezierSegment:\n    \"\"\"\n    Represents a Bezier segment in a :class:`Curve` object.\n    \"\"\"\n\n    cdef public tuple c1, c2, end_point\n    cdef public bool is_corner\n\n    def __init__(self, c1, c2, end_point):\n        self.c1 = c1\n        self.c2 = c2\n        self.end_point = end_point\n        self.is_corner = False\n\n    def __repr__(self):\n        return \"BezierSegment(c1=%s, c2=%s, end_point=%s)\" % (self.c1,\n                self.c2, self.end_point)\n\n\ncdef class CornerSegment:\n    \"\"\"\n    Represents a corner segment in a :class:`Curve` object.\n    \"\"\"\n\n    cdef public tuple c, end_point\n    cdef public bool is_corner\n\n    def __init__(self, c, end_point):\n        self.c = c\n        self.end_point = end_point\n        self.is_corner = True\n\n    def __repr__(self):\n        return \"CornerSegment(c=%s, end_point=%s)\" % (self.c, self.end_point)\n\n\ncdef class Curve:\n    \"\"\"\n    Curve objects represent closed, non intersecting curves.\n\n    Curves are made of a list of :class:`BezierSegment` and\n    :class:`CornerSegment` objects connected to each other.\n    \"\"\"\n\n    cdef public list segments\n    cdef public list children\n\n    # Bezier tesselation methods constants\n    regular = 0\n    adaptive = 1\n\n    def __init__(self):\n        self.segments = []\n        self.children = []\n\n    property start_point:\n        \"\"\"\n        The curve starting point.\n        \"\"\"\n        def __get__(self):\n            return self.segments[-1].end_point\n\n    def tesselate(self, method=adaptive, res=30):\n        \"\"\"\n        Tesselate the curve.\n\n        Returns a numpy array containing the curve vertices. The *method*\n        argument is for selecting the bezier segments tesselation method:\n        :attr:`adaptive` (the default) uses an adaptive tesselation algorithm\n        and :attr:`regular` divides the segments with a fixed number of steps\n        (controled by the *res* argument).\n        \"\"\"\n        # Tesselate segments\n        num_verts = 0\n        tess_segs = []\n        start_point = self.start_point\n        bezier_cp = np.empty((4, 2))\n        for seg in self.segments:\n            if seg.is_corner:\n                tseg = np.zeros((2, 2))\n                tseg[0,:] = seg.c\n                tseg[1,:] = seg.end_point\n                tess_segs.append(tseg)\n                num_verts += 2\n            else:\n                bezier_cp[0,:] = start_point\n                bezier_cp[1,:] = seg.c1\n                bezier_cp[2,:] = seg.c2\n                bezier_cp[3,:] = seg.end_point\n                if method == self.adaptive:\n                    tseg = adaptive_bezier(bezier_cp)\n                elif method == self.regular:\n                    tseg = bezier(bezier_cp, res)\n                tess_segs.append(tseg)\n                num_verts += len(tseg)\n            start_point = seg.end_point\n        # Create result buffer\n        ret = np.empty((num_verts, 2))\n        cur_index = 0\n        for seg in tess_segs:\n            num_verts = len(seg)\n            ret[cur_index:cur_index + num_verts] = seg\n            cur_index += num_verts        \n        return ret\n\n    def __iter__(self):\n        return iter(self.segments)\n\n    cdef append_bezier(self, potrace_dpoint_s *c1, potrace_dpoint_s *c2,\n            potrace_dpoint_s *end_point):\n        self.segments.append(BezierSegment((c1.x, c1.y), (c2.x, c2.y),\n            (end_point.x, end_point.y)))\n\n    cdef append_corner(self, potrace_dpoint_s *c, potrace_dpoint_s *end_point):\n        self.segments.append(CornerSegment((c.x, c.y), (end_point.x,\n            end_point.y)))\n\n\ncdef class Path:\n    \"\"\"\n    Path objects store a list of :class:`Curve` objects.\n    \"\"\"\n\n    cdef public list curves\n    cdef public list curves_tree\n\n    def __init__(self):\n        self.curves = []\n        self.curves_tree = []\n\n    cdef append_curve(self, potrace_curve_s *curve):\n        cdef potrace_dpoint_s *c1, *c2, *end_point\n        cdef Curve new_curve = Curve()\n        for i in range(curve.n):\n            c1 = &curve.c[i][0]\n            c2 = &curve.c[i][1]\n            end_point = &curve.c[i][2]\n            if curve.tag[i] == POTRACE_CURVETO:\n                new_curve.append_bezier(c1, c2, end_point)\n            elif curve.tag[i] == POTRACE_CORNER:\n                new_curve.append_corner(c2, end_point)\n        self.curves.append(new_curve)\n        return new_curve\n\n    def __iter__(self):\n        return iter(self.curves)\n\n\ndef potracelib_version():\n    \"\"\"\n    Return the potrace library version.\n    \"\"\"\n    return cpython.bytes.PyBytes_FromString(potrace_version()).decode()\n\n\n# Utility functions\n\ncdef void setpixel(potrace_bitmap_s *bmp, int x, int y, int on):\n    \"\"\"\n    Set a pixel on or off in a potrace_bitmap_s.\n    \"\"\"\n    if on:\n        bmp.map[y*bmp.dy + x//N] |=  (1uL << (N - 1 - x % N))\n    else:\n        bmp.map[y*bmp.dy + x//N] &= ~(1uL << (N - 1 - x % N))\n\n\ncdef State state_from_ptr(potrace_state_s *state):\n    \"\"\"\n    Create a State wrapping a C potrace_state_s pointer.\n    \"\"\"\n    cdef State ret = State()\n    ret.po_state = state\n    return ret\n\n\ncdef Path path_from_ptr(potrace_path_s *plist):\n    \"\"\"\n    Create a Path instance containing a copy of the paths defined in *plist*.\n    \"\"\"\n    cdef potrace_path_s *cur_path = plist\n    cdef Path path = Path()    \n    # Store linear structure\n    curves_map = {}\n    while cur_path != NULL:        \n        curves_map[<int>cur_path] = path.append_curve(&cur_path.curve)\n        cur_path = cur_path.next\n    # Store tree structure\n    init_curves_tree(path.curves_tree, curves_map, plist)\n    return path\n\n\ncdef init_curves_tree(list child_list, dict curves_map, potrace_path_s *plist):\n    \"\"\"\n    Init a curves tree structure.\n    \"\"\"\n    cdef potrace_path_s *cur_path = plist\n    if plist == NULL:\n        return\n    while cur_path != NULL:\n        cur_curve = curves_map[<int>cur_path]\n        child_list.append(cur_curve)\n        init_curves_tree(cur_curve.children, curves_map, cur_path.childlist)\n        cur_path = cur_path.sibling\n\n\n__all__ = [\"TURNPOLICY_BLACK\", \"TURNPOLICY_WHITE\", \"TURNPOLICY_LEFT\",\n    \"TURNPOLICY_RIGHT\", \"TURNPOLICY_MINORITY\", \"TURNPOLICY_MAJORITY\",\n    \"TURNPOLICY_RANDOM\", \"Bitmap\", \"Path\", \"Curve\", \"BezierSegment\",\n    \"CornerSegment\", \"potracelib_version\"]\n"
  },
  {
    "path": "potrace/agg/__init__.py",
    "content": ""
  },
  {
    "path": "potrace/agg/basics.pxd",
    "content": "cdef extern from \"agg2/agg_basics.h\":\n    enum path_commands_e:\n        path_cmd_stop \"agg::path_cmd_stop\"\n        path_cmd_move_to \"agg::path_cmd_move_to\"\n        path_cmd_line_to \"agg::path_cmd_line_to\"\n        path_cmd_curve3 \"agg::path_cmd_curve3\"\n        path_cmd_curve4 \"agg::path_cmd_curve4\"\n        path_cmd_curveN \"agg::path_cmd_curveN\"\n        path_cmd_catrom \"agg::path_cmd_catrom\"\n        path_cmd_ubspline \"agg::path_cmd_ubspline\"\n        path_cmd_end_poly \"agg::path_cmd_end_poly\"\n        path_cmd_mask \"agg::path_cmd_mask\"\n\n"
  },
  {
    "path": "potrace/agg/curves.pxd",
    "content": "cdef extern from \"agg2/agg_curves.h\":\n    struct curve4_div \"agg::curve4_div\":\n        void rewind(unsigned)\n        int vertex(double *x, double *y)\n\n    curve4_div* new_curve4_div \"new agg::curve4_div\" (double x1, double y1,\n            double x2, double y2,\n            double x3, double y3,\n            double x4, double y4)\n    void delete_curve4_div \"delete \" (curve4_div* curve)\n\n\ncdef unsigned num_vertices(curve4_div *curve)\n"
  },
  {
    "path": "potrace/agg/curves.pyx",
    "content": "cimport potrace.agg.basics as agg\n\n\ncdef unsigned num_vertices(curve4_div *curve):\n    cdef unsigned count = 0\n    cdef double x, y\n    curve.rewind(0)\n    while curve.vertex(&x, &y) != agg.path_cmd_stop:\n        count += 1\n    return count\n"
  },
  {
    "path": "potrace/bezier.pxd",
    "content": "cimport numpy as np\n\n\ncdef np.ndarray bezier(np.ndarray p, int steps=?)\ncdef np.ndarray adaptive_bezier(np.ndarray p)\n"
  },
  {
    "path": "potrace/bezier.pyx",
    "content": "cimport numpy as np\nfrom potrace.agg cimport curves as agg\n\nimport numpy as np\n\n\ncdef np.ndarray bezier(np.ndarray p_, int steps=30):\n    \"\"\"\n    Calculate a bezier curve from the 4 control points defined in the numpy\n    array *p*.\n\n    Returns a numpy array containing *steps + 1* vertices equally spaced along\n    the curve.\n    \n    The function uses the forward differencing algorithm described here:\n    http://www.niksula.cs.hut.fi/~hkankaan/Homepages/bezierfast.html\n    \"\"\"\n    cdef double t = 1.0 / steps\n    cdef double temp = t * t\n    cdef np.ndarray[np.double_t, ndim=2] p=p_, points\n    cdef np.ndarray[np.double_t, ndim=1] f, fd, fdd_per_2, fddd_per_2, fddd, \\\n            fdd, fddd_per_6\n    \n    f = p[0].copy()\n    fd = 3 * (p[1] - p[0]) * t\n    fdd_per_2 = 3 * (p[0] - 2 * p[1] + p[2]) * temp\n    fddd_per_2 = 3 * (3 * (p[1] - p[2]) + p[3] - p[0]) * temp * t\n    \n    fddd = 2 * fddd_per_2\n    fdd = 2 * fdd_per_2\n    fddd_per_6 = fddd_per_2 / 3.0\n    \n    points = np.empty((steps + 1, 2))\n    for i in range(steps + 1):\n        points[i] = f\n        f += fd + fdd_per_2 + fddd_per_6\n        fd += fdd + fddd_per_2\n        fdd += fddd\n        fdd_per_2 += fddd_per_2\n\n    return points\n\n\ncdef np.ndarray adaptive_bezier(np.ndarray p):\n    \"\"\"\n    Tesselate a bezier curve adaptively\n    \"\"\"\n    cdef agg.curve4_div *curve\n    cdef np.ndarray[np.double_t, ndim=2] points\n    cdef int i, num_vertices\n    curve = agg.new_curve4_div(p[0][0], p[0][1],\n            p[1][0], p[1][1],\n            p[2][0], p[2][1],\n            p[3][0], p[3][1])\n    num_vertices = agg.num_vertices(curve)\n    points = np.empty((num_vertices, 2))\n    curve.rewind(0)\n    for i in range(num_vertices):\n        curve.vertex(&points[i, 0], &points[i, 1])\n    agg.delete_curve4_div(curve)\n    return points\n\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[tool.poetry]\nname = \"potrace\"\nversion = \"0.3\"\ndescription = \"potrace Python bindings\"\nreadme = \"README.rst\"\nauthors = [\"Luper Rouch <luper.rouch@gmail.com>\"]\nlicense = \"GPL\"\nkeywords = [\"potrace\", \"bitmap\", \"vector\", \"graphics\"]\nclassifiers = [\n    \"Development Status :: 4 - Beta\",\n    \"Environment :: Console\",\n    \"Intended Audience :: Developers\",\n    \"License :: OSI Approved :: GNU General Public License (GPL)\",\n    \"Natural Language :: English\",\n    \"Operating System :: OS Independent\",\n    \"Programming Language :: Cython\",\n    \"Programming Language :: Python\",\n    \"Topic :: Software Development :: Libraries :: Python Modules\",\n    \"Topic :: Multimedia :: Graphics :: Graphics Conversion\"\n]\ninclude = [\n    {path = \"potrace/*.pxd\"},\n    {path = \"potrace/*.pyx\"},\n    {path = \"potrace/agg/*.pxd\"},\n    {path = \"potrace/agg/*.pyx\"}\n]\n\n[tool.poetry.build]\nscript = \"build.py\"\ngenerate-setup-file = true\n\n[tool.poetry.dependencies]\npython = \"*\"\nnumpy = \"*\"\n\n[tool.poetry.dev-dependencies]\nCython = \"*\"\nPillow = \"*\"\nnose = \"*\"\n\n[build-system]\nrequires = [\"poetry-core>=1.0.0\", \"wheel\", \"setuptools\", \"Cython\", \"numpy\"]\nbuild-backend = \"poetry.core.masonry.api\"\n"
  },
  {
    "path": "tests/__init__.py",
    "content": ""
  },
  {
    "path": "tests/test_basic.py",
    "content": "from nose.tools import assert_raises, assert_equal\nimport numpy as np\nimport potrace\n\n\ndef test_errors():\n    assert_raises(TypeError, potrace.Bitmap, None)\n    assert_raises(TypeError, potrace.Bitmap, [1, 2, 3])\n    assert_raises(TypeError, potrace.Bitmap, (1, 2, 3))\n\n\ndef test_trace():\n    data = np.zeros((32, 32), np.uint32)\n    data[8:32-8, 8:32-8] = 1\n    bmp = potrace.Bitmap(data)\n    path = bmp.trace()\n    ref_points = [(8.0, 8.0),\n            (16.0, 8.0),\n            (24.0, 8.0),\n            (24.0, 16.0),\n            (24.0, 24.0),\n            (16.0, 24.0),\n            (8.0, 24.0),\n            (8.0, 16.0)\n        ]\n    points = []\n    for curve in path:\n        for segment in curve:\n            assert segment.is_corner\n            points.append(segment.c)\n            points.append(segment.end_point)\n    assert_equal(points, ref_points)\n\n\ndef test_tree():\n    data = np.zeros((32, 32), np.uint32)\n    data[8:32-8, 8:32-8] = 1\n    data[10:32-10, 10:32-10] = 0\n    bmp = potrace.Bitmap(data)\n    path = bmp.trace()\n    assert_equal(len(path.curves_tree), 1)\n    assert_equal(len(path.curves_tree[0].children), 1)\n    assert_equal(len(path.curves_tree[0].children[0].children), 0)\n\n\nif __name__ == \"__main__\":\n    test_errors()\n    test_trace()\n"
  },
  {
    "path": "tests/test_bezier.py",
    "content": "import numpy as np\nimport potrace\nfrom PIL import Image\nfrom PIL import ImageDraw\n\n\nadaptive = \\\n[[ 13.31417446,  23.4900536 ],\n [ 12.20495274,  22.94905765],\n [ 10.4881329,   21.41537576],\n [  9.36908006,  19.48807348],\n [  8.84314831,  17.33204811],\n [  8.90569174,  15.11219696],\n [  9.55206442,  12.99341733],\n [ 10.77762044,  11.14060654],\n [ 12.57771388,   9.71866189],\n [ 13.71540898,   9.24905362],\n [ 13.71540898,   9.24905362],\n [ 14.95878038,   8.88032993],\n [ 17.33619353,   8.76367751],\n [ 19.50044342,   9.30445891],\n [ 21.36045485,  10.40542956],\n [ 22.82515263,  11.9693449 ],\n [ 23.80346155,  13.89896035],\n [ 24.20430642,  16.09703136],\n [ 23.93661202,  18.46631335],\n [ 23.4900536,   19.68582554],\n [ 23.4900536,   19.68582554],\n [ 22.78194571,  21.1010289 ],\n [ 20.67271536,  23.14462753],\n [ 17.95986131,  24.15882153],\n [ 14.89670995,  24.04890542],\n [ 13.31417446,  23.4900536 ]]\n\n\nregular = \\\n[[ 13.31417446, 23.4900536 ],\n [ 11.65190728, 22.51888426],\n [ 10.37429236, 21.22192386],\n [  9.47895097, 19.68359985],\n [  8.96350443, 17.98833963],\n [  8.82557401, 16.22057063],\n [  9.062781,   14.46472026],\n [  9.67274671, 12.80521596],\n [ 10.65309241, 11.32648514],\n [ 12.00143941, 10.11295521],\n [ 13.71540898,  9.24905362],\n [ 13.71540898,  9.24905362],\n [ 15.68274205,  8.80074698],\n [ 17.55445232,  8.81676355],\n [ 19.2839093,   9.24731412],\n [ 20.82448247, 10.04260947],\n [ 22.12954135, 11.15286036],\n [ 23.15245542, 12.5282776 ],\n [ 23.84659418, 14.11907195],\n [ 24.16532713, 15.87545421],\n [ 24.06202378, 17.74763514],\n [ 23.4900536,  19.68582554],\n [ 23.4900536,  19.68582554],\n [ 22.91315459, 20.80514675],\n [ 22.19509034, 21.77643139],\n [ 21.35207374, 22.59361829],\n [ 20.40031768, 23.25064632],\n [ 19.35603504, 23.74145431],\n [ 18.23543873, 24.05998113],\n [ 17.05474163, 24.20016562],\n [ 15.83015662, 24.15594663],\n [ 14.5778966,  23.921263  ],\n [ 13.31417446, 23.4900536 ]]\n\ndef test_tesselate():\n    # Make a circle\n    data = np.zeros((32, 32), np.uint32)\n    radius2 = 8 * 8\n    for j in range(32):\n        y = j - 16\n        for i in range(32):\n            x = i - 16\n            if x * x + y * y > radius2:\n                data[j, i] = 0\n            else:\n                data[j, i] = 1\n\n    # Trace it\n    bmp = potrace.Bitmap(data)\n    path = bmp.trace()\n    out = Image.new(\"RGB\", (32, 32), (0, 0, 0))\n    ImageDraw.Draw(out)\n    curve = path.curves[0]\n    points = curve.tesselate(curve.adaptive)\n    assert np.abs(points - adaptive).sum() < 1e-6\n    points = curve.tesselate(curve.regular, res=10)\n    assert np.abs(points - regular).sum() < 1e-6\n"
  }
]