Initial commit

main
pv2ajsu8k 8 months ago committed by zart
commit ecb3d3de26

10
.gitignore vendored

@ -0,0 +1,10 @@
/build
/dist
*.sqlite
*.spec
*.db
/.idea
*.rar
pyinstaller --onefile --noconsole --icon=timer.ico main.py
/src/python/.vscode

@ -0,0 +1,235 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based on the Program.
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.

@ -0,0 +1,44 @@
# File_Sys_Sim
# 说明
本项目是一个文件系统模拟器,可以模拟文件系统的基本操作,包括创建文件、删除文件、创建目录、删除目录、打开文件、关闭文件、读文件、写文件等。
# 目录结构
```
.
├── LICENSE
├── README.md
├── file_sys_sim.py
├── requirements.txt
└── test_file_sys_sim.py
```
# 运行
```
python main.py
```
# 依赖
### 环境要求:
- Python 3.6+
## 第三方依赖:
- Pillow 7.0.0+
- numpy 1.19.2+
# 许可证
本项目使用 GPL-3.0 许可证。

@ -0,0 +1,50 @@
# -*- encoding: utf-8 -*-
"""
@File : disk_read.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/9 10:04 zart20 1.0 None
"""
# 定义常量
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
# MAX_SECTORS_TO_READ = 15927 # 要读取的最大扇区数量
MAX_SECTORS_TO_READ = 0
# 打开设备文件
drive_letter = "I:" # 请替换为你要操作的磁盘
file_path = f"\\\\.\\{drive_letter}" # 设备文件路径
try:
with open(file_path, 'rb') as disk:
sector_number = 0 # 起始扇区号
byte_offset = 0 # 字节偏移量初始化
sectors_read = 0 # 已读取的扇区数量
while sectors_read <= MAX_SECTORS_TO_READ:
# 读取扇区数据
disk.seek(sector_number * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
# 输出扇区数据
print(f"扇区号:{sector_number}")
for i in range(0, len(sector_data), BYTES_PER_LINE):
line_data = sector_data[i:i + BYTES_PER_LINE]
print(f"{byte_offset + i:08X}:", end=" ") # 输出字节偏移量16进制
for byte in line_data:
print(f"{byte:02X}", end=" ") # 输出每个字节的16进制表示
print() # 换行
# 更新扇区号,读取下一个扇区
sector_number += 1
byte_offset += len(sector_data) # 累加字节偏移量
sectors_read += 1
except PermissionError:
print("没有足够的权限来访问磁盘。请以管理员身份运行程序。")
except FileNotFoundError:
print(f"找不到设备文件:{file_path}")
except Exception as e:
print(f"发生错误:{e}")

@ -0,0 +1,41 @@
# -*- encoding: utf-8 -*-
"""
@File : disk_to_bin.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/9 16:01 zart20 1.0 None
"""
# 定义常量
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
MAX_SECTORS_TO_READ = 15927 # 要读取的最大扇区数量
# MAX_SECTORS_TO_READ = 3
# 打开设备文件
drive_letter = "I:" # 请替换为你要操作的磁盘
file_path = f"\\\\.\\{drive_letter}" # 设备文件路径
with open("output.bin", "wb+") as out:
with open(file_path, 'rb') as disk:
sector_number = 0 # 起始扇区号
byte_offset = 0 # 字节偏移量初始化
sectors_read = 0 # 已读取的扇区数量
while sectors_read <= MAX_SECTORS_TO_READ:
# 读取扇区数据
disk.seek(sector_number * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
print(sector_data)
out.write(sector_data)
for byte in sector_data:
print(f"{byte:02X}", end=" ") # 输出每个字节的16进制表示
print() # 换行
sector_number += 1
byte_offset += len(sector_data) # 累加字节偏移量
sectors_read += 1

@ -0,0 +1,61 @@
# -*- encoding: utf-8 -*-
"""
@File : disk_read.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/9 10:04 zart20 1.0 None
"""
import pandas as pd
columns = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
indexs = []
my_dict = {i: [] for i in columns}
# 定义常量
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
MAX_SECTORS_TO_READ = 15927 # 要读取的最大扇区数量
# MAX_SECTORS_TO_READ = 10
# 打开设备文件
drive_letter = "I:" # 请替换为你要操作的磁盘
file_path = f"\\\\.\\{drive_letter}" # 设备文件路径
try:
with open(file_path, 'rb') as disk:
sector_number = 0 # 起始扇区号
byte_offset = 0 # 字节偏移量初始化
sectors_read = 0 # 已读取的扇区数量
while sectors_read <= MAX_SECTORS_TO_READ:
# 读取扇区数据
disk.seek(sector_number * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
# 输出扇区数据
for i in range(0, len(sector_data), BYTES_PER_LINE):
line_data = sector_data[i:i + BYTES_PER_LINE]
indexs.append(f"{byte_offset + i:08X}:")
n = 0
for byte in line_data:
my_dict[columns[n]].append(f"{byte:02X}")
n += 1
# 更新扇区号,读取下一个扇区
sector_number += 1
byte_offset += len(sector_data) # 累加字节偏移量
sectors_read += 1
except PermissionError:
print("没有足够的权限来访问磁盘。请以管理员身份运行程序。")
except FileNotFoundError:
print(f"找不到设备文件:{file_path}")
except Exception as e:
print(f"发生错误:{e}")
df = pd.DataFrame(my_dict, index=indexs)
print(df)
df.to_csv("output.csv")
print('输出完毕')

@ -0,0 +1,245 @@
# -*- encoding: utf-8 -*-
'''
@File : files_sys_sim.py
@License : (C)Copyright 2018-2022
@Modify Time @Author @Version @Desciption
------------ ------- -------- -----------
2023/8/15 10:41 zart20 1.0 None
'''
import copy
import random
from pprint import pprint
######### 7.1 #################
blocks_label_set = set()
def get_unique_tag(): # 获取唯一字母标签
for ascii_code in range(65, 91):
character = chr(ascii_code)
if character not in blocks_label_set:
blocks_label_set.add(character)
return character
def initialize_fileblock(block_num, code): # 产生数据块
Fileblock = []
for n in range(int(block_num)):
Fileblock.append(f"{code}{n + 1}")
if code == "Z":
blocks_label_set.clear()
return Fileblock
def initialize_folderitem(): # 产生文件
FolderItem = []
for i in range(3):
name = f"f{i}"
first = random.randint(1, 100)
block_num = random.randint(1, 11)
item = [name, first, block_num]
FolderItem.append(item)
return FolderItem
def initialize_simdisk():
SimDisk = [[0] * 10 for _ in range(10)] # 产生 磁盘数据
return SimDisk
def initialize_simfat():
SimFAT = [[0] * 10 for _ in range(10)] # 产生 FAT数据
SimFAT[0][0] = 100
return SimFAT
######### 7.2 #################
# 假设一个磁盘块大小为64KB以字节为单位
BLOCK_SIZE = 64
# 初始化SimFAT表元素长度为10则是100块磁盘块
NUM_ENTRIES = 10
# 随机构造一个SimFAT表
sim_fat = [[0] * NUM_ENTRIES for _ in range(NUM_ENTRIES)]
def count_available_space(sim_fat):
for i in range(1, len(sim_fat)): # 构造操作数组的操作
for j in range(1, len(sim_fat)):
if random.randint(1, 10) > 3: # 模拟40% 概率的填入率,
sim_fat[i][j] = random.choice([f"{n:02}" for n in range(100)] + ['FF']) # 给每个位置填入随机块
num_available_blocks = sum(row.count(0) for row in sim_fat) # 统计为0的块
return num_available_blocks * BLOCK_SIZE
######### 7.3 #################
BLOCK_NUM = 7
LAST_BLOCK = "FF"
FIRST_BLOCK = 8 # 第一块fat位置
def generate_chain_structure():
sim_fat = ["0"] * BLOCK_NUM # 文件块的大小
used_blocks = {"00", FIRST_BLOCK} # 用于存储已经被占用的块位置,且预置00块和第一块为已占用状态
for i in range(len(sim_fat) - 1):
while True:
location = random.randint(0, 99)
if location not in used_blocks: # 防止已经被占用的快被重新占用
sim_fat[i] = location
used_blocks.add(location)
break
sim_fat[-1] = LAST_BLOCK
chain_structure = [] # 链结构
for i, value in enumerate(sim_fat):
if i == 0:
print(f"SimFAT[{FIRST_BLOCK}] -> {value}")
item = {FIRST_BLOCK: value} # 构建链结构
else:
print(f"SimFAT[{sim_fat[i - 1]}] -> {value}")
item = {sim_fat[i - 1]: value} # 构建链结构
chain_structure.append(item)
return chain_structure
if __name__ == "__main__":
print(generate_chain_structure())
######### 7.4 #################
sim_fat_chain = [{'08': '02'}, {'02': '56'}, {'56': '31'}, {'31': '55'}, {'55': '67'}, {'67': '74'}, {'74': 'FF'}]
def get_disk_block_order(sim_fat_chain, start_block):
disk_order = [start_block]
current_block = start_block # 当前块
while current_block != "FF":
next_block = None
for item in sim_fat_chain: # item是字典
if current_block in item:
next_block = item[current_block] # 当前键的值是下一个块的键
break
if next_block is None: # 当没有下一个块时退出循环
break
disk_order.append(next_block)
current_block = next_block # 更新当前块
return disk_order
print(get_disk_block_order(sim_fat_chain, FIRST_BLOCK))
######### 7.5 #################
class Folder:
def __init__(self):
self.folder_items = []
def insert_folder_item(self, file_name, first_block, num_blocks): # 插入一个目录项
item = {
"file_name": file_name,
"first_block": first_block,
"num_blocks": num_blocks
}
self.folder_items.append(item)
return item
def retrieve_folder_item(self, target_name): # 检索一个目录项
for item in self.folder_items:
if item["file_name"] == target_name:
return item
return None
def delete_folder_item(self, target_name): # 删除一个目录项
for item in self.folder_items:
if item["file_name"] == target_name:
self.folder_items.remove(item)
return True
return False
def print_folder_items(self):
for item in self.folder_items:
print(f"File: {item['file_name']} - First Block: {item['first_block']} - Num Blocks: {item['num_blocks']}")
# 通过第一块磁盘块的位置读取整个fat表
def read_sim_fat(first_block: int, simfat: list[list[int | str]]):
"""通过首块从fat中查找FAT表"""
block_nums = [] # 创建一个空列表来存储块号
block_nums.append(first_block)
while True:
row = first_block // 10
clown = first_block % 10
b_num = simfat[row][clown]
if b_num != "FF":
block_nums.append(b_num)
first_block = b_num # 更新 first_block 以继续查找下一个块
else:
break
return block_nums
# X5 【编程7.14】编制程序假定文件夹信息丢失程序会依据FAT表重新生成文件夹。
fat = [[100, 50, 0, 1, 0, 0, 0, 0, 0, 0],
[79, 3, 0, 85, 0, 28, 'FF', 91, 39, 0],
[46, 69, 52, 0, 0, 0, 0, 0, 67, 0],
[0, 0, 22, 21, 87, 0, 92, 0, 84, 66],
[0, 77, 0, 0, 0, 0, 'FF', 0, 0, 0],
['FF', 0, 18, 0, 13, 41, 34, 0, 61, 0],
[0, 11, 0, 0, 0, 99, 20, 93, 10, 16],
[0, 36, 0, 0, 0, 0, 55, 'FF', 0, 98],
[15, 0, 0, 0, 58, 88, 32, 86, 38, 0],
[0, 76, 80, 33, 0, 0, 0, 0, 65, 17]]
def restore_folder_by_fat(fat_table: list[list]) -> list:
fat_table = copy.deepcopy(fat_table)
ls = [n for i in fat_table for n in i]
folders = []
while "FF" in ls:
element = "FF"
folder = list()
while element in ls:
ls.remove(element)
for i in range(len(fat_table)):
for n in range(len(fat_table[0])):
if fat_table[i][n] == element:
num = i * 10 + n
folder.insert(0, num)
element = num
fat_table[i][n] = 0
print(folder, len(folder), folder[0])
folders.append(folder)
return folders
pprint(fat_table)
pprint(fat)
return folders
# 编程7.15】编制程序首先借助于操作系统磁盘读取功能或借助于专用软件读取真实磁盘的第0个扇区形成一个文件。
# 然后编程解析该文件的结构解析0扇区内容并显示。
if __name__ == '__main__':
Fileblock = initialize_fileblock(6, get_unique_tag())
# Fileblock = initialize_fileblock()
FolderItem = initialize_folderitem()
SimDisk = initialize_simdisk()
SimFAT = initialize_simfat()
fat_spece = count_available_space(SimDisk)
restore_folder_by_fat(fat)

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,961 @@
%!PS-Adobe-3.0 EPSF-3.0
%APL_DSC_Encoding: UTF8
%%Title: (Unknown)
%%Creator: (Unknown)
%%CreationDate: (Unknown)
%%For: (Unknown)
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 0 0 39 38
%%EndComments
%%BeginProlog
%%BeginFile: cg-pdf.ps
%%Copyright: Copyright 2000-2004 Apple Computer Incorporated.
%%Copyright: All Rights Reserved.
currentpacking true setpacking
/cg_md 141 dict def
cg_md begin
/L3? languagelevel 3 ge def
/bd{bind def}bind def
/ld{load def}bd
/xs{exch store}bd
/xd{exch def}bd
/cmmtx matrix def
mark
/sc/setcolor
/scs/setcolorspace
/dr/defineresource
/fr/findresource
/T/true
/F/false
/d/setdash
/w/setlinewidth
/J/setlinecap
/j/setlinejoin
/M/setmiterlimit
/i/setflat
/rc/rectclip
/rf/rectfill
/rs/rectstroke
/f/fill
/f*/eofill
/sf/selectfont
/s/show
%/as/ashow
/xS/xshow
/yS/yshow
/xyS/xyshow
/S/stroke
/m/moveto
/l/lineto
/c/curveto
/h/closepath
/n/newpath
/q/gsave
/Q/grestore
counttomark 2 idiv
%dup (number of ld's = )print == flush % *** how many
{ld}repeat pop
/SC{ % CSname
/ColorSpace fr scs
}bd
/sopr /setoverprint where{pop/setoverprint}{/pop}ifelse ld
/soprm /setoverprintmode where{pop/setoverprintmode}{/pop}ifelse ld
/cgmtx matrix def
/sdmtx{cgmtx currentmatrix pop}bd
/CM {cgmtx setmatrix}bd % pop the ctm: our gstate ctm on host is now identity
/cm {cmmtx astore CM concat}bd % reset the matrix and then concat
/W{clip newpath}bd
/W*{eoclip newpath}bd
statusdict begin product end dup (HP) anchorsearch{
pop pop pop % pop off the search results
true
}{
pop % previous search result
(hp) anchorsearch{
pop pop true
}{
pop false
}ifelse
}ifelse
{ % HP is the product: we use this method of stroking because of a bug in their clone printers with certain T3 fonts
{
{ % charCode Wx Wy
pop pop % charCode
(0)dup 0 4 -1 roll put
F charpath
}cshow
}
}{
{F charpath}
}ifelse
/cply exch bd
/cps {cply stroke}bd
/pgsave 0 def
/bp{/pgsave save store}bd
/ep{pgsave restore showpage}def % dont' bind
/re{4 2 roll m 1 index 0 rlineto 0 exch rlineto neg 0 rlineto h}bd
/scrdict 10 dict def
/scrmtx matrix def
/patarray 0 def
/createpat{patarray 3 1 roll put}bd
/makepat{
scrmtx astore pop
gsave
initgraphics
CM
patarray exch get
scrmtx
makepattern
grestore
setpattern
}bd
/cg_BeginEPSF{
userdict save/cg_b4_Inc_state exch put
userdict/cg_endepsf/cg_EndEPSF load put
count userdict/cg_op_count 3 -1 roll put
countdictstack dup array dictstack userdict/cg_dict_array 3 -1 roll put
3 sub{end}repeat
/showpage {} def
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin
10 setmiterlimit [] 0 setdash newpath
false setstrokeadjust false setoverprint % don't use F
}bd
/cg_EndEPSF{
countdictstack 3 sub { end } repeat
cg_dict_array 3 1 index length 3 sub getinterval
{begin}forall
count userdict/cg_op_count get sub{pop}repeat
userdict/cg_b4_Inc_state get restore
F setpacking
}bd
/cg_biproc{currentfile/RunLengthDecode filter}bd
/cg_aiproc{currentfile/ASCII85Decode filter/RunLengthDecode filter}bd
/ImageDataSource 0 def
L3?{
/cg_mibiproc{pop pop/ImageDataSource{cg_biproc}def}bd
/cg_miaiproc{pop pop/ImageDataSource{cg_aiproc}def}bd
}{
/ImageBandMask 0 def
/ImageBandData 0 def
/cg_mibiproc{
string/ImageBandMask xs
string/ImageBandData xs
/ImageDataSource{[currentfile/RunLengthDecode filter dup ImageBandMask/readstring cvx
/pop cvx dup ImageBandData/readstring cvx/pop cvx]cvx bind}bd
}bd
/cg_miaiproc{
string/ImageBandMask xs
string/ImageBandData xs
/ImageDataSource{[currentfile/ASCII85Decode filter/RunLengthDecode filter
dup ImageBandMask/readstring cvx
/pop cvx dup ImageBandData/readstring cvx/pop cvx]cvx bind}bd
}bd
}ifelse
/imsave 0 def
/BI{save/imsave xd mark}bd
/EI{imsave restore}bd
/ID{
counttomark 2 idiv
dup 2 add % leave room for imagetype and imagematrix
dict begin
{def} repeat
pop % remove mark
/ImageType 1 def
/ImageMatrix[Width 0 0 Height neg 0 Height]def
currentdict dup/ImageMask known{ImageMask}{F}ifelse exch
% currentdict on stack
L3?{
dup/MaskedImage known
{
pop
<<
/ImageType 3
/InterleaveType 2
/DataDict currentdict
/MaskDict
<< /ImageType 1
/Width Width
/Height Height
/ImageMatrix ImageMatrix
/BitsPerComponent 1
/Decode [0 1]
currentdict/Interpolate known
{/Interpolate Interpolate}if
>>
>>
}if
}if
exch
{imagemask}{image}ifelse
end % pop imagedict from dict stack
}bd
/cguidfix{statusdict begin mark version end
{cvr}stopped{cleartomark 0}{exch pop}ifelse
2012 lt{dup findfont dup length dict begin
{1 index/FID ne 2 index/UniqueID ne and
{def} {pop pop} ifelse}forall
currentdict end definefont pop
}{pop}ifelse
}bd
/t_array 0 def
/t_i 0 def
/t_c 1 string def
/x_proc{ % x y
exch t_array t_i get add exch moveto
/t_i t_i 1 add store
}bd
/y_proc{ % x y
t_array t_i get add moveto
/t_i t_i 1 add store
}bd
/xy_proc{
% x y
t_array t_i 2 copy 1 add get 3 1 roll get
4 -1 roll add 3 1 roll add moveto
/t_i t_i 2 add store
}bd
/sop 0 def % don't bind sop
/cp_proc/x_proc ld % default moveto proc is for xwidths only
/base_charpath % string array
{
/t_array xs
/t_i 0 def
{ % char
t_c 0 3 -1 roll put
currentpoint
t_c cply sop
cp_proc
}forall
/t_array 0 def
}bd
/sop/stroke ld % default sop is stroke. Done here so we don't bind in /base_charpath
% default sop is stroke
/nop{}def
/xsp/base_charpath ld
/ysp{/cp_proc/y_proc ld base_charpath/cp_proc/x_proc ld}bd
/xysp{/cp_proc/xy_proc ld base_charpath/cp_proc/x_proc ld}bd
/xmp{/sop/nop ld /cp_proc/x_proc ld base_charpath/sop/stroke ld}bd
/ymp{/sop/nop ld /cp_proc/y_proc ld base_charpath/sop/stroke ld}bd
/xymp{/sop/nop ld /cp_proc/xy_proc ld base_charpath/sop/stroke ld}bd
/refnt{ % newname encoding fontname
findfont dup length dict copy dup
/Encoding 4 -1 roll put
definefont pop
}bd
/renmfont{ % newname fontname
findfont dup length dict copy definefont pop
}bd
L3? dup dup{save exch}if
% languagelevel2 ONLY code goes here
/Range 0 def
/DataSource 0 def
/val 0 def
/nRange 0 def
/mulRange 0 def
/d0 0 def
/r0 0 def
/di 0 def
/ri 0 def
/a0 0 def
/a1 0 def
/r1 0 def
/r2 0 def
/dx 0 def
/Nsteps 0 def
/sh3tp 0 def
/ymax 0 def
/ymin 0 def
/xmax 0 def
/xmin 0 def
/setupFunEval % funDict -- % this calculates and sets up a function dict for evaulation.
{
begin
/nRange Range length 2 idiv store
/mulRange % precompute the range data needed to map a sample value from the table to a range value
% this data looks like [ range0mul range0min range1mul range1min ... rangeN-1mul rangeN-1min ]
[
0 1 nRange 1 sub
{ % index
2 mul/nDim2 xd % 2*dimension# we are dealing with
Range nDim2 get % ymin
Range nDim2 1 add get % ymin ymax
1 index sub % ymin (ymax-ymin)
% xmin = 0, xmax = 255 (2^bitspersample - 1)
255 div % ymin (ymax-ymin)/(xmax - xmin)
exch % (ymax-ymin)/(xmax - xmin) ymin
}for
]store
end
}bd
/FunEval % val1 fundict -> comp1 comp2 ... compN
{
begin
% the value passed in is the base index into the table
nRange mul /val xd % compute the actual index to the table
% since there are nRange entries per base index
0 1 nRange 1 sub
{
dup 2 mul/nDim2 xd % dim
val % base value to use to do our lookup
add DataSource exch get % lookedupval
mulRange nDim2 get mul % lookedupval*(ymax-ymin)/(xmax-xmin)
mulRange nDim2 1 add get % lookedupval*(ymax-ymin)/(xmax-xmin) ymin
add % interpolated result
}for % comp1 comp2 ... compN
end
}bd
/max % a b -> max(a, b)
{
2 copy lt
{exch pop}{pop}ifelse
}bd
/sh2
{ % emulation of shading type 2. Assumes shading dictionary is top dictionary on the dict stack
/Coords load aload pop % x0 y0 x1 y1
3 index 3 index translate % origin is now at beginning point of shading
% x0 y0 x1 y1
3 -1 roll sub % x0 x1 y1-y0
3 1 roll exch % y1-y0 x1 x0
sub % y1-y0 x1-x0
2 copy
dup mul exch dup mul add sqrt % length of segment between two points
dup
scale
atan % atan (dy/dx)
%dup (rotation angle = )print ==
rotate % now line between 0,0 and 1,0 is the line perpendicular to which the axial lines are drawn
/Function load setupFunEval % may need to setup function dictionary by calling setupFunEval
% this is now specific to axial shadings. Compute the maximum bounds to fill
clippath {pathbbox}stopped {0 0 0 0}if newpath % x0 y0 x1 y1
/ymax xs
/xmax xs
/ymin xs
/xmin xs
currentdict/Extend known
{
/Extend load 0 get
{
0/Function load FunEval sc % evaluate the function to get a color and set it
xmin ymin xmin abs ymax ymin sub rectfill
}if
}if
% paint the rects. The sampling frequency is that of our table
/Nsteps/Function load/Size get 0 get 1 sub store
/dx 1 Nsteps div store
gsave
/di ymax ymin sub store
/Function load
% loop Nsteps + 1 times, incrementing the index by 1 each time
0 1 Nsteps
{
1 index FunEval sc
0 ymin dx di rectfill
dx 0 translate
}for
pop % pop our function
grestore % origin is back to start point
currentdict/Extend known
{
/Extend load 1 get
{
Nsteps/Function load FunEval sc % last element
1 ymin xmax 1 sub abs ymax ymin sub rectfill
}if
}if
}bd
/shp % this paints our shape for shading type 3
{ % x1 r1 x0 r0 -
4 copy
% fill interior arc
dup 0 gt{
0 exch a1 a0 arc
}{
pop 0 moveto
}ifelse
dup 0 gt{
0 exch a0 a1 arcn
}{
pop 0 lineto
}ifelse
fill
% fill exterior arc
dup 0 gt{
0 exch a0 a1 arc
}{
pop 0 moveto
}ifelse
dup 0 gt{
0 exch a1 a0 arcn
}{
pop 0 lineto
}ifelse
fill
}bd
/calcmaxs
{ % calculate maximum distance vector from origin to corner points
% of bbox
xmin dup mul ymin dup mul add sqrt % (xmin2 + ymin2)
xmax dup mul ymin dup mul add sqrt % (xmax2 + ymin2)
xmin dup mul ymax dup mul add sqrt % (xmin2 + ymax2)
xmax dup mul ymax dup mul add sqrt % (xmax2 + ymax2)
max max max % maximum value
}bd
/sh3
{ % emulation of shading type 3. Assumes shading dictionary is top dictionary on the dict stack
/Coords load aload pop % x0 y0 r1 x1 y1 r2
5 index 5 index translate % origin is now at first circle origin
3 -1 roll 6 -1 roll sub % y0 r1 y1 r2 dx
3 -1 roll 5 -1 roll sub % r1 r2 dx dy
2 copy dup mul exch dup mul add sqrt
/dx xs % r1 r2 dx dy
2 copy 0 ne exch 0 ne or
{
% r1 r2 dx dy
exch atan rotate % we are now rotated so dy is zero and positive values of dx move us as expected
}{
pop pop
}ifelse
% r1 r2
/r2 xs
/r1 xs
/Function load
dup/Size get 0 get 1 sub % this is the size of our table minus 1
/Nsteps xs % at some point we should optimize this better so NSteps is based on needed steps for the device
setupFunEval % may need to setup function dictionary by calling setupFunEval
% determine the case:
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: r1 = r2
% case 3: r1 != r2
dx r2 add r1 lt{
% circle 2 inside of circle 1
0
}{
dx r1 add r2 le
{ % circle 1 inside of circle 2
1
}{ % circles don't contain each other
r1 r2 eq
{ % equal
2
}{ % r1 != r2
3
}ifelse
}ifelse
}ifelse
/sh3tp xs % sh3tp has the number of our different cases
clippath {pathbbox}stopped {0 0 0 0}if
newpath % x0 y0 x1 y1
/ymax xs
/xmax xs
/ymin xs
/xmin xs
% Arc angle atan( sqrt((dx*dx + dy*dy) - dr*dr), dr)
dx dup mul r2 r1 sub dup mul sub dup 0 gt
{
sqrt r2 r1 sub atan
/a0 exch 180 exch sub store
/a1 a0 neg store
}{
pop
/a0 0 store
/a1 360 store
}ifelse
currentdict/Extend known
{
/Extend load 0 get r1 0 gt and % no need to extend if the radius of the first end is 0
{
0/Function load FunEval sc % evaluate the function to get a color and set it
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: circles don't contain each other and r1 == r2
% case 3: circles don't contain each other and r1 != r2
{
{ % case 0
dx 0 r1 360 0 arcn
xmin ymin moveto
xmax ymin lineto
xmax ymax lineto
xmin ymax lineto
xmin ymin lineto
eofill % for the bigger radius we fill everything except our circle
}
{ % case 1
r1 0 gt{0 0 r1 0 360 arc fill}if
}
{ % case 2
% r1 == r2, extend 0
% r3 = r, x3 = -(abs(minx) + r), x1 = 0
% x(i+1) r(i+1) x(i) r(i) shp
0 r1 xmin abs r1 add neg r1 shp
}
{ % case 3
% no containment, r1 != r2
r2 r1 gt{ % the endpoint we are drawing is that with a circle of zero radius
% x(i+1) r(i+1) x(i) r(i) shp
0 r1
r1 neg r2 r1 sub div dx mul % this is point of beginning circle
0 % point of ending circle
shp % takes x(i+1) r(i+1) x(i) r(i)
}{ % the first circle is the bigger of the two
% we find a circle on our line which is outside the bbox in the
% negative direction
% x(i+1) r(i+1) x(i) r(i) shp
0 r1 calcmaxs % 0 r1 maxs
dup
% calculating xs: (-(maxs+r2)*x2)/(x2-(r1-r2))
r2 add dx mul dx r1 r2 sub sub div
neg % maxs xs'
exch 1 index % xs' maxs xs'
abs exch sub
shp
}ifelse
}
}sh3tp get exec % execute the extend at beginning proc for our shading type
}if
}if
% now do the shading
/d0 0 store
/r0 r1 store
/di dx Nsteps div store
/ri r2 r1 sub Nsteps div store
/Function load
0 1 Nsteps
{ % function t(i)
1 index FunEval sc
d0 di add r0 ri add d0 r0 shp
{
% fill interior arc
d0 0 r0 a1 a0 arc
d0 di add 0 r0 ri add a0 a1 arcn
fill
% fill exterior arc
d0 0 r0 a0 a1 arc
d0 di add 0 r0 ri add a1 a0 arcn
fill
}pop
% advance to next
/d0 d0 di add store
/r0 r0 ri add store
}for
pop % pop our function dict
% handle Extend
currentdict/Extend known
{
/Extend load 1 get r2 0 gt and % no need to extend if the radius of the last end is 0
{
Nsteps/Function load FunEval sc % last element
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: circles don't contain each other and r1 == r2
% case 3: circles don't contain each other and r1 != r2
{
{
dx 0 r2 0 360 arc fill
}
{
dx 0 r2 360 0 arcn
xmin ymin moveto
xmax ymin lineto
xmax ymax lineto
xmin ymax lineto
xmin ymin lineto
eofill % for the bigger radius we fill everything except our circle
}
{ % r1 == r2, extend 1
% r3 = r, x3 = (abs(xmax) + r), x1 = dx
% x(i+1) r(i+1) x(i) r(i) shp
xmax abs r1 add r1 dx r1 shp
}
{ % no containment, r1 != r2
r2 r1 gt{
% we find a circle on our line which is outside the bbox in the
% positive direction
% x(i+1) r(i+1) x(i) r(i) shp
calcmaxs dup % maxs maxs
% calculating xs: ((maxs+r1)*x2)/(x2-(r2-r1))
r1 add dx mul dx r2 r1 sub sub div % maxs xs
exch 1 index % xs maxs xs
exch sub
dx r2
shp
}{ % the endpoint we are drawing is that with a circle of zero radius
% x(i+1) r(i+1) x(i) r(i) shp
r1 neg r2 r1 sub div dx mul % this is point of ending circle
0 % radius of ending circle
dx % point of starting circle
r2 % radius of starting circle
shp
}ifelse
}
}
sh3tp get exec % execute the extend at end proc for our shading type
}if
}if
}bd
/sh % emulation of shfill operator for type 2 and type 3 shadings based on type 0 functions
{ % shadingDict --
begin
/ShadingType load dup dup 2 eq exch 3 eq or
{ % shadingtype
gsave
newpath
/ColorSpace load scs
currentdict/BBox known
{
/BBox load aload pop % llx lly urx ury
2 index sub % llx lly urx ury-lly
3 index % llx lly urx ury-lly llx
3 -1 roll exch sub
exch rectclip
}if
2 eq
{sh2}{sh3}ifelse
grestore
}{
% shadingtype
pop
(DEBUG: shading type unimplemented\n)print flush
}ifelse
end
}bd
% end of language level 2 ONLY code
{restore}if not dup{save exch}if
% languagelevel3 ONLY code goes here
L3?{ % we do these loads conditionally or else they will fail on a level 2 printer
/sh/shfill ld
/csq/clipsave ld
/csQ/cliprestore ld
}if
{restore}if
%currentdict dup maxlength exch length sub (number of extra slots in md = )print == flush % *** how many entries are free
end
setpacking
% count 0 ne { pstack(***extras on stack during prolog execution***\n)print flush}if % *** BARK if anything is left on stack
%%EndFile
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%PageBoundingBox: 0 0 39 38
%%BeginPageSetup
cg_md begin
bp
sdmtx
[ /CIEBasedABC 4 dict dup begin
/WhitePoint [ 0.9505 1.0000 1.0891 ] def
/DecodeABC [
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
] def
/MatrixABC [ 0.4124 0.2126 0.0193 0.3576 0.7151 0.1192 0.1805 0.0722 0.9508 ] def
/RangeLMN [ 0.0 0.9505 0.0 1.0000 0.0 1.0891 ] def
end ] /Cs1 exch/ColorSpace dr pop
%%EndPageSetup
0.60000002 i
/Cs1 SC
0.59215689 0.59215689 0.59215689 sc
q
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
W*
0 0 39 38 rc
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
f
Q
2.0678732 w
0.40000001 0.40000001 0.40000001 sc
q
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
W*
0 0 39 38 rc
1 0 0 -1 0 25.643332 cm
0 0 m
25.422678 0 l
25.422678 25.422678 l
0 25.422678 l
0 0 l
h
S
Q
q
0 0 39 38 rc
40 0 0 13 -1 25 cm
save
360 15 cg_miaiproc
0 -39 -39{
gsave 1 120 div 1 39 div scale 0 exch translate
currentfile 0 (EOD
)/SubFileDecode filter
L3?{flushfile}{cvx exec}ifelse
120 40 scale
BI
/Width 120
/Height 40
/BitsPerComponent 8
/Decode[
0 1
0 1
0 1
]
/DataSource ImageDataSource
/MaskedImage true
ID
EI
grestore} bind for
0 39 m 0 0 l 120 0 l 120 39 l h W n EOD
JcC<$MZ<5IL];r*PQ11Rrr7QLJcD8?nc4OHrpB]]o;$r5Z)%B%rqlTmnc8%VU&Y,QrcWj)k@VD>rdXoe
rqQBjnc4aNrnIEkgLc"Ka_(O+rb_XHrqQBjnc7DD\c;ZVrbM:@rd03FgOA44rd"0Kre^Vfqe#j&qu?3e
Q2gj&rb21@rb2:fc^03Ln<a-9rbV@Arf$hiph'O#qu?3eaT'ZfrjVZ7rb;@jJX=9@r0RDBrbD4?rf$D[
rqQBjnc50Zri,[)rbMLo\!Mo;repbhqe#h?rep5WrqQBjnc6,um/R(_rg`aqrbh^tJX=*;reUPdqe#hA
reUVeq.BVCph'O#qu?3eV#UGhrfHnerc.q$T9l4;re1&YrbVRfph'MFrfQtfrqQBjnc5Tfrq$,Dph'MI
rfr&$^6ehLph'MFrdacUrcJ.)rfm7k!G5sCq"t*^!36(umJ_P/B)[&SQA:g:Qi;C-B)ZuQHh_4PGlF$.
Qi<6EB)_T&s7-/ls8M*YG5,\KI/'%ZQcGHlQMu.(B)[,UG5,\KI/''-Pk\kiq"t*f!;QW!s8LdPE;4&E
JUs0SQd_<#Q2Yq$B)[;ZEVO/FJG#9.Pk\kiq"t*^!42_)dJdqVB)[MBQ[tL\Qi<6KEqj8GK`5i`B)[JS
Qi<6EB)_T&s7-0as1n[6`;XHIB)ZKCM1M#CQg:";P5]CpB)[VcCAVWBBE!\TQi<6EB)_T&s7-0#s8KM&
B)ZNDN6%?:QhQjGOT'(kB)[_fB_uE@B`<qVQi<6EB)_T&s7-0Os4IANWVC*)C]9BGQbJdeNfF+"rbD4?
rf$VarbDFll'MC6ph'O#qu?3e_Z0W5rg`aqrbh^tYa:E;repbiqe#h?rf$VarbVRqk*Q(3ph'O#qu?3e
e,T%>rqQJSph'MFrf_o"^6ehTrb)+?rb2:fq.9V=rbh^uj-Tb0ph'O#qu?3eaT)82reC2[rcJ.)R$X_;
re1&YrbVRfph'MFrfc9,rfm1irqQBjnc6l5rpB]5rFYt>rcnF.JX=*;rdjiVrc%jfph'MIrfuu>m[*p;
ph'O#qu?3ecN!n)rc\'Krd99`rKk9crdFQRrcS3eph'MMrg)9)rfm1irqQBjnc7);rnIEkph'MVnX"fn
cBnNrrd"9Nrd+Qdph'MPrg)3'!13\Lph'O#qu?3eeGoNqrbM:@re5oijd4\frg!J*ph'MTrc7dGrdW=^
rfm1irqQBjnc7;Arl"eLqe#h@re]<pJX>McrfmD&ph'MYrbhLCre&L_rfm1irqHNos8Dug!8@JP\+jS7
C&X'BQd(lfQi<0IDtmrDM#M/dB)ZHBLWc%`Pk\kiq"t*^!8[\SWVC*)C]9C2Q[tM&Qi<*GD>7`BMuIDe
B)ZKCMTD.`Pk\kiq"t*_!!!#Zs8MrqSG6^qDZ5cLQbJgcNrEhnB)?3>N;.#aCAs43Qi<6EB)_T&s7-0P
s8MfmOSEGeEW20$Q^4!;MuIGfB)ZHBN;.#aD#TL4Qi<6EB)_T&s7-0Zs8)cpoDXL>B)ZoOQ%>:9Qi;g?
BDZ<?B`<k`B)Z]IP/!@_Pk\kiq"t*^!:9abmJ_P/B)[&SQB@N:Qi;^6B)ZTFLA5B[EW207Qi<6EB)_T&
s7-0Ys8M*YG5,YMH[>a>JX*j4rdjiVrc%jfph'MIrfu`7d?jisph'O#qu?3eo)J^Drc!F#l=RV>rcJ-e
ph'MLrg(!Zrfm1irqQBjnc8@_rmC^\hI_=N`b,3qrce-Lrd4X1d?im[rfm1irqQBjnc8Ibrl"eLJS*>B
dUrK-rc7dGrdV&:rfm1irqQBjnc8Ib_eF[9gM-Y>ph'MX[[6ZRrfm1irqQBjnc8IbJS)K*jC\CCqe#hW
VjICIph'O#qu;0
~> 0 40 m 0 39 l 120 39 l 120 40 l h W n EOD
nc8IbJS(Hbrdk,^r+>qXVjICIph'O#JcG<@JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcG!7
J,
~> restore
14 0 0 25 25 0 cm
save
126 6 cg_miaiproc
38 -37 -36{
gsave 1 42 div 1 75 div scale 0 exch translate
currentfile 0 (EOD
)/SubFileDecode filter
L3?{flushfile}{cvx exec}ifelse
42 38 scale
BI
/Width 42
/Height 38
/BitsPerComponent 8
/Decode[
0 1
0 1
0 1
]
/DataSource ImageDataSource
/MaskedImage true
ID
EI
grestore} bind for
0 37 m 0 0 l 42 0 l 42 37 l h W n EOD
JcG]KqZ-V-rdt#Zre.29rfm1i!;HTiq"t*g!<-U0K)90ZKVt19Pk\kiq"t*g!<-U0K)90ZKVt19PQ>B.
qI]a%qu?Nnrau.]qe#h\VjICIph'O#qu?Nnrau.]qe#h\WgE^Orfm1irqQBjqZ-V-rdt#Zre.29rfm1i
rqQBjqZ-V-rdt#Zre.SDp6YcCph'O#qu?Nnrau.]qe#h\VjICIph'O#qu?Nnrau.]qe#h\\sMiOrfm1i
rqQBjqZ-V-rdt#Zre.29rfm1irqQBjqZ-V-rdt#Zre/.Tk*Q(3ph'O#qu?Nnrau.]qe#h\VjICIph'O#
qu?Nnrau.]qe#h\b*UtOrfm1irqQBjqZ-V-rdt#Zre.29rfm1irqQBjqZ-V-rdt#Zre/^desHB#ph'O#
qu?Nnrau.]qe#h\VjICIph'O#qu?Nnrau.]qe#h\g6^*Orfm1irqQBjqZ-V-rdt#Zre.29rfm1irqQBj
qZ-V-rdt#Zre09t`g?[hph'O#qu?Nnrau.]qe#h\VjICIph'O#qu?Nnrau.]qe#h\lBf5Orfm1irqQBj
qZ-V-rdt#Zre.29rfm1irqQBjqZ-V-rdt#Zre0j/[[6uXph'O#qu?Nnrau.]qe#h\VjICIph'O#qu?Nn
rau.]qe#h\qNn@Orfm1irqQBjqZ-V-rdt#Zre.29rfm1irqQBjqZ-V-rdt#Z!JH++KVt19Pk\kiq"t*g
!<-U0K)90ZKVt19Pk\kiq"t*g!<-U0K)90ZKVt19Pk\kiq"t*g!<-U0K)90ZKVt19Pk\kiq"t*i!!*'"
rau.]qe#h\VjICIph'O#qu?Nnrau.]qe#h\VjICIph'O#!WW2us8)fqB)[DZB)[I]Qi<6EB)_T&s8)fq
B)[DZB)[I]Qi<6HB)ZEAq"t*g!<-U0K)90ZKVt19Pk\kiq"t*g!<-U0K)90ZKVt.:PQ@#5ph'O#qu?Nn
rau.]qe#h\VjICIph'O#qu;0
~> 0 38 m 0 0 l 42 0 l 42 38 l h W n EOD
qZ-V-rdt#Zre.29rfm1irqQBjqZ-V-rdt#Zre.29rfm1i!;HTiq"t*g!<-U0K)90ZKVt19Pk\kiq"t*g
!<-U0K)90ZKVt19P6#9-qI]a%qu?Nnrau.]qe#h\WgE^Lrc@jHrqQBjqZ-V-rdt#Zre.D?rfR1tph'Me
rr2fpqZ-V-rdt#Zre.MBrf6tnph'N!rr)WlqZ-V-rdt#Zre.VE!/U`5M>h2`B)].-s8)fqB)[DZB)[Il
Qi;[5B)ZND`p`s)!<-U0K)90ZKY!KMQi;I/B)Z`JfBiP7!<-U0K)90ZKYNlQQMu.(B)[#RjQZ^A!<-U0
K)90ZKYj)TPl>b!B)[D]n)jZI!<-U0K)90ZKZ0;WOoB7nB)[nkpZ);N!<-U0K)90ZKZ]V^Q^@]3rbM:@
rh08gi;`ZSrau.]qe#h\bEr3brb2(=rj1>YqZ-V-rdt#Zre/^drKmM:ph'M>rl3RiqZ-V-rdt#Zre/[c
rdOWSrbqeeeGoCGrau.]qe#h\g6_f*rg*P.ph'MLroDK,qZ-V-rdt#Zre0!lrfmD'ph'MWrpS/4qZ-V-
rdt#Zre09tr0RDFrbqRDrf@'QbQ%G>rau.]qe#h\i0XG'rbM:@rh08gaT),;rau.]qe#h\lBh@6reg\g
ph'N2_Z0K5rau.]qe#h\k*Q(#ph'M>rl)YPqZ-V-rdt#Zre0j/pm:u/ph'MCrmna^qZ-V-rdt#Zre0a,
rg*P.ph'MLroCWiqZ-V-rdt#Zre1-7q3V)Frc@jHrdk(;[f?4)rau.]qe#h\op>Z@rbqRDrf@'QZiBn&
rau.]qdok^KE-]#Qi<$EC\VN@TDnbms8)fqB)[DZB)[J\Qi;mAB_Z3=ZE!s%!<-U0K)90ZK`7>;K_T0Y
C&Z)Ls8)fqB)[DZB)[J_Ie[OSDZ81^s8;ou!!*"1rdt#ZrbV@ArceA%U&Xuirau.]nn.lPrpQT]rVu`p
rau.]ok+2arq;i]qZ-V-rdsoWrh'2fV#U,fqZ-V-rdt#ZriqXdqZ-V-rdt,`rl(Z4mJm%`rau.crmcu-
J,
~> 0 38 m 0 36 l 42 36 l 42 38 l h W n EOD
qZ-V-reUR(N;rbTrkn`uOoL"4JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$l2Q8
~> restore
ep
end
%%Trailer
%%EOF

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@ -0,0 +1,961 @@
%!PS-Adobe-3.0 EPSF-3.0
%APL_DSC_Encoding: UTF8
%%Title: (Unknown)
%%Creator: (Unknown)
%%CreationDate: (Unknown)
%%For: (Unknown)
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%Pages: 1
%%BoundingBox: 0 0 39 38
%%EndComments
%%BeginProlog
%%BeginFile: cg-pdf.ps
%%Copyright: Copyright 2000-2004 Apple Computer Incorporated.
%%Copyright: All Rights Reserved.
currentpacking true setpacking
/cg_md 141 dict def
cg_md begin
/L3? languagelevel 3 ge def
/bd{bind def}bind def
/ld{load def}bd
/xs{exch store}bd
/xd{exch def}bd
/cmmtx matrix def
mark
/sc/setcolor
/scs/setcolorspace
/dr/defineresource
/fr/findresource
/T/true
/F/false
/d/setdash
/w/setlinewidth
/J/setlinecap
/j/setlinejoin
/M/setmiterlimit
/i/setflat
/rc/rectclip
/rf/rectfill
/rs/rectstroke
/f/fill
/f*/eofill
/sf/selectfont
/s/show
%/as/ashow
/xS/xshow
/yS/yshow
/xyS/xyshow
/S/stroke
/m/moveto
/l/lineto
/c/curveto
/h/closepath
/n/newpath
/q/gsave
/Q/grestore
counttomark 2 idiv
%dup (number of ld's = )print == flush % *** how many
{ld}repeat pop
/SC{ % CSname
/ColorSpace fr scs
}bd
/sopr /setoverprint where{pop/setoverprint}{/pop}ifelse ld
/soprm /setoverprintmode where{pop/setoverprintmode}{/pop}ifelse ld
/cgmtx matrix def
/sdmtx{cgmtx currentmatrix pop}bd
/CM {cgmtx setmatrix}bd % pop the ctm: our gstate ctm on host is now identity
/cm {cmmtx astore CM concat}bd % reset the matrix and then concat
/W{clip newpath}bd
/W*{eoclip newpath}bd
statusdict begin product end dup (HP) anchorsearch{
pop pop pop % pop off the search results
true
}{
pop % previous search result
(hp) anchorsearch{
pop pop true
}{
pop false
}ifelse
}ifelse
{ % HP is the product: we use this method of stroking because of a bug in their clone printers with certain T3 fonts
{
{ % charCode Wx Wy
pop pop % charCode
(0)dup 0 4 -1 roll put
F charpath
}cshow
}
}{
{F charpath}
}ifelse
/cply exch bd
/cps {cply stroke}bd
/pgsave 0 def
/bp{/pgsave save store}bd
/ep{pgsave restore showpage}def % dont' bind
/re{4 2 roll m 1 index 0 rlineto 0 exch rlineto neg 0 rlineto h}bd
/scrdict 10 dict def
/scrmtx matrix def
/patarray 0 def
/createpat{patarray 3 1 roll put}bd
/makepat{
scrmtx astore pop
gsave
initgraphics
CM
patarray exch get
scrmtx
makepattern
grestore
setpattern
}bd
/cg_BeginEPSF{
userdict save/cg_b4_Inc_state exch put
userdict/cg_endepsf/cg_EndEPSF load put
count userdict/cg_op_count 3 -1 roll put
countdictstack dup array dictstack userdict/cg_dict_array 3 -1 roll put
3 sub{end}repeat
/showpage {} def
0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin
10 setmiterlimit [] 0 setdash newpath
false setstrokeadjust false setoverprint % don't use F
}bd
/cg_EndEPSF{
countdictstack 3 sub { end } repeat
cg_dict_array 3 1 index length 3 sub getinterval
{begin}forall
count userdict/cg_op_count get sub{pop}repeat
userdict/cg_b4_Inc_state get restore
F setpacking
}bd
/cg_biproc{currentfile/RunLengthDecode filter}bd
/cg_aiproc{currentfile/ASCII85Decode filter/RunLengthDecode filter}bd
/ImageDataSource 0 def
L3?{
/cg_mibiproc{pop pop/ImageDataSource{cg_biproc}def}bd
/cg_miaiproc{pop pop/ImageDataSource{cg_aiproc}def}bd
}{
/ImageBandMask 0 def
/ImageBandData 0 def
/cg_mibiproc{
string/ImageBandMask xs
string/ImageBandData xs
/ImageDataSource{[currentfile/RunLengthDecode filter dup ImageBandMask/readstring cvx
/pop cvx dup ImageBandData/readstring cvx/pop cvx]cvx bind}bd
}bd
/cg_miaiproc{
string/ImageBandMask xs
string/ImageBandData xs
/ImageDataSource{[currentfile/ASCII85Decode filter/RunLengthDecode filter
dup ImageBandMask/readstring cvx
/pop cvx dup ImageBandData/readstring cvx/pop cvx]cvx bind}bd
}bd
}ifelse
/imsave 0 def
/BI{save/imsave xd mark}bd
/EI{imsave restore}bd
/ID{
counttomark 2 idiv
dup 2 add % leave room for imagetype and imagematrix
dict begin
{def} repeat
pop % remove mark
/ImageType 1 def
/ImageMatrix[Width 0 0 Height neg 0 Height]def
currentdict dup/ImageMask known{ImageMask}{F}ifelse exch
% currentdict on stack
L3?{
dup/MaskedImage known
{
pop
<<
/ImageType 3
/InterleaveType 2
/DataDict currentdict
/MaskDict
<< /ImageType 1
/Width Width
/Height Height
/ImageMatrix ImageMatrix
/BitsPerComponent 1
/Decode [0 1]
currentdict/Interpolate known
{/Interpolate Interpolate}if
>>
>>
}if
}if
exch
{imagemask}{image}ifelse
end % pop imagedict from dict stack
}bd
/cguidfix{statusdict begin mark version end
{cvr}stopped{cleartomark 0}{exch pop}ifelse
2012 lt{dup findfont dup length dict begin
{1 index/FID ne 2 index/UniqueID ne and
{def} {pop pop} ifelse}forall
currentdict end definefont pop
}{pop}ifelse
}bd
/t_array 0 def
/t_i 0 def
/t_c 1 string def
/x_proc{ % x y
exch t_array t_i get add exch moveto
/t_i t_i 1 add store
}bd
/y_proc{ % x y
t_array t_i get add moveto
/t_i t_i 1 add store
}bd
/xy_proc{
% x y
t_array t_i 2 copy 1 add get 3 1 roll get
4 -1 roll add 3 1 roll add moveto
/t_i t_i 2 add store
}bd
/sop 0 def % don't bind sop
/cp_proc/x_proc ld % default moveto proc is for xwidths only
/base_charpath % string array
{
/t_array xs
/t_i 0 def
{ % char
t_c 0 3 -1 roll put
currentpoint
t_c cply sop
cp_proc
}forall
/t_array 0 def
}bd
/sop/stroke ld % default sop is stroke. Done here so we don't bind in /base_charpath
% default sop is stroke
/nop{}def
/xsp/base_charpath ld
/ysp{/cp_proc/y_proc ld base_charpath/cp_proc/x_proc ld}bd
/xysp{/cp_proc/xy_proc ld base_charpath/cp_proc/x_proc ld}bd
/xmp{/sop/nop ld /cp_proc/x_proc ld base_charpath/sop/stroke ld}bd
/ymp{/sop/nop ld /cp_proc/y_proc ld base_charpath/sop/stroke ld}bd
/xymp{/sop/nop ld /cp_proc/xy_proc ld base_charpath/sop/stroke ld}bd
/refnt{ % newname encoding fontname
findfont dup length dict copy dup
/Encoding 4 -1 roll put
definefont pop
}bd
/renmfont{ % newname fontname
findfont dup length dict copy definefont pop
}bd
L3? dup dup{save exch}if
% languagelevel2 ONLY code goes here
/Range 0 def
/DataSource 0 def
/val 0 def
/nRange 0 def
/mulRange 0 def
/d0 0 def
/r0 0 def
/di 0 def
/ri 0 def
/a0 0 def
/a1 0 def
/r1 0 def
/r2 0 def
/dx 0 def
/Nsteps 0 def
/sh3tp 0 def
/ymax 0 def
/ymin 0 def
/xmax 0 def
/xmin 0 def
/setupFunEval % funDict -- % this calculates and sets up a function dict for evaulation.
{
begin
/nRange Range length 2 idiv store
/mulRange % precompute the range data needed to map a sample value from the table to a range value
% this data looks like [ range0mul range0min range1mul range1min ... rangeN-1mul rangeN-1min ]
[
0 1 nRange 1 sub
{ % index
2 mul/nDim2 xd % 2*dimension# we are dealing with
Range nDim2 get % ymin
Range nDim2 1 add get % ymin ymax
1 index sub % ymin (ymax-ymin)
% xmin = 0, xmax = 255 (2^bitspersample - 1)
255 div % ymin (ymax-ymin)/(xmax - xmin)
exch % (ymax-ymin)/(xmax - xmin) ymin
}for
]store
end
}bd
/FunEval % val1 fundict -> comp1 comp2 ... compN
{
begin
% the value passed in is the base index into the table
nRange mul /val xd % compute the actual index to the table
% since there are nRange entries per base index
0 1 nRange 1 sub
{
dup 2 mul/nDim2 xd % dim
val % base value to use to do our lookup
add DataSource exch get % lookedupval
mulRange nDim2 get mul % lookedupval*(ymax-ymin)/(xmax-xmin)
mulRange nDim2 1 add get % lookedupval*(ymax-ymin)/(xmax-xmin) ymin
add % interpolated result
}for % comp1 comp2 ... compN
end
}bd
/max % a b -> max(a, b)
{
2 copy lt
{exch pop}{pop}ifelse
}bd
/sh2
{ % emulation of shading type 2. Assumes shading dictionary is top dictionary on the dict stack
/Coords load aload pop % x0 y0 x1 y1
3 index 3 index translate % origin is now at beginning point of shading
% x0 y0 x1 y1
3 -1 roll sub % x0 x1 y1-y0
3 1 roll exch % y1-y0 x1 x0
sub % y1-y0 x1-x0
2 copy
dup mul exch dup mul add sqrt % length of segment between two points
dup
scale
atan % atan (dy/dx)
%dup (rotation angle = )print ==
rotate % now line between 0,0 and 1,0 is the line perpendicular to which the axial lines are drawn
/Function load setupFunEval % may need to setup function dictionary by calling setupFunEval
% this is now specific to axial shadings. Compute the maximum bounds to fill
clippath {pathbbox}stopped {0 0 0 0}if newpath % x0 y0 x1 y1
/ymax xs
/xmax xs
/ymin xs
/xmin xs
currentdict/Extend known
{
/Extend load 0 get
{
0/Function load FunEval sc % evaluate the function to get a color and set it
xmin ymin xmin abs ymax ymin sub rectfill
}if
}if
% paint the rects. The sampling frequency is that of our table
/Nsteps/Function load/Size get 0 get 1 sub store
/dx 1 Nsteps div store
gsave
/di ymax ymin sub store
/Function load
% loop Nsteps + 1 times, incrementing the index by 1 each time
0 1 Nsteps
{
1 index FunEval sc
0 ymin dx di rectfill
dx 0 translate
}for
pop % pop our function
grestore % origin is back to start point
currentdict/Extend known
{
/Extend load 1 get
{
Nsteps/Function load FunEval sc % last element
1 ymin xmax 1 sub abs ymax ymin sub rectfill
}if
}if
}bd
/shp % this paints our shape for shading type 3
{ % x1 r1 x0 r0 -
4 copy
% fill interior arc
dup 0 gt{
0 exch a1 a0 arc
}{
pop 0 moveto
}ifelse
dup 0 gt{
0 exch a0 a1 arcn
}{
pop 0 lineto
}ifelse
fill
% fill exterior arc
dup 0 gt{
0 exch a0 a1 arc
}{
pop 0 moveto
}ifelse
dup 0 gt{
0 exch a1 a0 arcn
}{
pop 0 lineto
}ifelse
fill
}bd
/calcmaxs
{ % calculate maximum distance vector from origin to corner points
% of bbox
xmin dup mul ymin dup mul add sqrt % (xmin2 + ymin2)
xmax dup mul ymin dup mul add sqrt % (xmax2 + ymin2)
xmin dup mul ymax dup mul add sqrt % (xmin2 + ymax2)
xmax dup mul ymax dup mul add sqrt % (xmax2 + ymax2)
max max max % maximum value
}bd
/sh3
{ % emulation of shading type 3. Assumes shading dictionary is top dictionary on the dict stack
/Coords load aload pop % x0 y0 r1 x1 y1 r2
5 index 5 index translate % origin is now at first circle origin
3 -1 roll 6 -1 roll sub % y0 r1 y1 r2 dx
3 -1 roll 5 -1 roll sub % r1 r2 dx dy
2 copy dup mul exch dup mul add sqrt
/dx xs % r1 r2 dx dy
2 copy 0 ne exch 0 ne or
{
% r1 r2 dx dy
exch atan rotate % we are now rotated so dy is zero and positive values of dx move us as expected
}{
pop pop
}ifelse
% r1 r2
/r2 xs
/r1 xs
/Function load
dup/Size get 0 get 1 sub % this is the size of our table minus 1
/Nsteps xs % at some point we should optimize this better so NSteps is based on needed steps for the device
setupFunEval % may need to setup function dictionary by calling setupFunEval
% determine the case:
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: r1 = r2
% case 3: r1 != r2
dx r2 add r1 lt{
% circle 2 inside of circle 1
0
}{
dx r1 add r2 le
{ % circle 1 inside of circle 2
1
}{ % circles don't contain each other
r1 r2 eq
{ % equal
2
}{ % r1 != r2
3
}ifelse
}ifelse
}ifelse
/sh3tp xs % sh3tp has the number of our different cases
clippath {pathbbox}stopped {0 0 0 0}if
newpath % x0 y0 x1 y1
/ymax xs
/xmax xs
/ymin xs
/xmin xs
% Arc angle atan( sqrt((dx*dx + dy*dy) - dr*dr), dr)
dx dup mul r2 r1 sub dup mul sub dup 0 gt
{
sqrt r2 r1 sub atan
/a0 exch 180 exch sub store
/a1 a0 neg store
}{
pop
/a0 0 store
/a1 360 store
}ifelse
currentdict/Extend known
{
/Extend load 0 get r1 0 gt and % no need to extend if the radius of the first end is 0
{
0/Function load FunEval sc % evaluate the function to get a color and set it
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: circles don't contain each other and r1 == r2
% case 3: circles don't contain each other and r1 != r2
{
{ % case 0
dx 0 r1 360 0 arcn
xmin ymin moveto
xmax ymin lineto
xmax ymax lineto
xmin ymax lineto
xmin ymin lineto
eofill % for the bigger radius we fill everything except our circle
}
{ % case 1
r1 0 gt{0 0 r1 0 360 arc fill}if
}
{ % case 2
% r1 == r2, extend 0
% r3 = r, x3 = -(abs(minx) + r), x1 = 0
% x(i+1) r(i+1) x(i) r(i) shp
0 r1 xmin abs r1 add neg r1 shp
}
{ % case 3
% no containment, r1 != r2
r2 r1 gt{ % the endpoint we are drawing is that with a circle of zero radius
% x(i+1) r(i+1) x(i) r(i) shp
0 r1
r1 neg r2 r1 sub div dx mul % this is point of beginning circle
0 % point of ending circle
shp % takes x(i+1) r(i+1) x(i) r(i)
}{ % the first circle is the bigger of the two
% we find a circle on our line which is outside the bbox in the
% negative direction
% x(i+1) r(i+1) x(i) r(i) shp
0 r1 calcmaxs % 0 r1 maxs
dup
% calculating xs: (-(maxs+r2)*x2)/(x2-(r1-r2))
r2 add dx mul dx r1 r2 sub sub div
neg % maxs xs'
exch 1 index % xs' maxs xs'
abs exch sub
shp
}ifelse
}
}sh3tp get exec % execute the extend at beginning proc for our shading type
}if
}if
% now do the shading
/d0 0 store
/r0 r1 store
/di dx Nsteps div store
/ri r2 r1 sub Nsteps div store
/Function load
0 1 Nsteps
{ % function t(i)
1 index FunEval sc
d0 di add r0 ri add d0 r0 shp
{
% fill interior arc
d0 0 r0 a1 a0 arc
d0 di add 0 r0 ri add a0 a1 arcn
fill
% fill exterior arc
d0 0 r0 a0 a1 arc
d0 di add 0 r0 ri add a1 a0 arcn
fill
}pop
% advance to next
/d0 d0 di add store
/r0 r0 ri add store
}for
pop % pop our function dict
% handle Extend
currentdict/Extend known
{
/Extend load 1 get r2 0 gt and % no need to extend if the radius of the last end is 0
{
Nsteps/Function load FunEval sc % last element
% case 0: circle1 inside circle2
% case 1: circle 2 inside circle 1
% case 2: circles don't contain each other and r1 == r2
% case 3: circles don't contain each other and r1 != r2
{
{
dx 0 r2 0 360 arc fill
}
{
dx 0 r2 360 0 arcn
xmin ymin moveto
xmax ymin lineto
xmax ymax lineto
xmin ymax lineto
xmin ymin lineto
eofill % for the bigger radius we fill everything except our circle
}
{ % r1 == r2, extend 1
% r3 = r, x3 = (abs(xmax) + r), x1 = dx
% x(i+1) r(i+1) x(i) r(i) shp
xmax abs r1 add r1 dx r1 shp
}
{ % no containment, r1 != r2
r2 r1 gt{
% we find a circle on our line which is outside the bbox in the
% positive direction
% x(i+1) r(i+1) x(i) r(i) shp
calcmaxs dup % maxs maxs
% calculating xs: ((maxs+r1)*x2)/(x2-(r2-r1))
r1 add dx mul dx r2 r1 sub sub div % maxs xs
exch 1 index % xs maxs xs
exch sub
dx r2
shp
}{ % the endpoint we are drawing is that with a circle of zero radius
% x(i+1) r(i+1) x(i) r(i) shp
r1 neg r2 r1 sub div dx mul % this is point of ending circle
0 % radius of ending circle
dx % point of starting circle
r2 % radius of starting circle
shp
}ifelse
}
}
sh3tp get exec % execute the extend at end proc for our shading type
}if
}if
}bd
/sh % emulation of shfill operator for type 2 and type 3 shadings based on type 0 functions
{ % shadingDict --
begin
/ShadingType load dup dup 2 eq exch 3 eq or
{ % shadingtype
gsave
newpath
/ColorSpace load scs
currentdict/BBox known
{
/BBox load aload pop % llx lly urx ury
2 index sub % llx lly urx ury-lly
3 index % llx lly urx ury-lly llx
3 -1 roll exch sub
exch rectclip
}if
2 eq
{sh2}{sh3}ifelse
grestore
}{
% shadingtype
pop
(DEBUG: shading type unimplemented\n)print flush
}ifelse
end
}bd
% end of language level 2 ONLY code
{restore}if not dup{save exch}if
% languagelevel3 ONLY code goes here
L3?{ % we do these loads conditionally or else they will fail on a level 2 printer
/sh/shfill ld
/csq/clipsave ld
/csQ/cliprestore ld
}if
{restore}if
%currentdict dup maxlength exch length sub (number of extra slots in md = )print == flush % *** how many entries are free
end
setpacking
% count 0 ne { pstack(***extras on stack during prolog execution***\n)print flush}if % *** BARK if anything is left on stack
%%EndFile
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%PageBoundingBox: 0 0 39 38
%%BeginPageSetup
cg_md begin
bp
sdmtx
[ /CIEBasedABC 4 dict dup begin
/WhitePoint [ 0.9505 1.0000 1.0891 ] def
/DecodeABC [
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
{ 1.0 0.0 3 -1 roll 1 index 1 index le { exch pop} { pop } ifelse
1 index 1 index ge { exch pop } { pop } ifelse <
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000001010101010101010101010101
0101010101010101010101010101010101010101010101020202020202020202
0202020202020202020202020202020202030303030303030303030303030303
0303030303030304040404040404040404040404040404040404050505050505
0505050505050505050506060606060606060606060606060607070707070707
0707070707070708080808080808080808080808090909090909090909090909
0a0a0a0a0a0a0a0a0a0a0a0b0b0b0b0b0b0b0b0b0b0b0c0c0c0c0c0c0c0c0c0c
0d0d0d0d0d0d0d0d0d0d0e0e0e0e0e0e0e0e0e0f0f0f0f0f0f0f0f0f10101010
1010101010111111111111111112121212121212121313131313131313141414
1414141414151515151515151616161616161616171717171717171818181818
18181919191919191a1a1a1a1a1a1a1b1b1b1b1b1b1c1c1c1c1c1c1c1d1d1d1d
1d1d1e1e1e1e1e1e1f1f1f1f1f1f202020202020212121212121222222222223
2323232323242424242425252525252526262626262727272727282828282829
292929292a2a2a2a2a2b2b2b2b2b2c2c2c2c2c2d2d2d2d2d2e2e2e2e2e2f2f2f
2f2f303030303131313131323232323333333333343434343535353535363636
36373737373838383839393939393a3a3a3a3b3b3b3b3c3c3c3c3d3d3d3d3e3e
3e3e3f3f3f3f4040404041414141424242424343434444444445454545464646
4647474748484848494949494a4a4a4b4b4b4b4c4c4c4d4d4d4d4e4e4e4f4f4f
4f50505051515151525252535353535454545555555656565657575758585859
59595a5a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f6060606061616162626263
63636464646565656666666767676868686969696a6a6a6b6b6b6c6c6d6d6d6e
6e6e6f6f6f707070717171727273737374747475757576767677777878787979
797a7a7b7b7b7c7c7c7d7d7e7e7e7f7f7f808081818182828283838484848585
86868687878888888989898a8a8b8b8b8c8c8d8d8d8e8e8f8f90909091919292
9293939494949595969697979798989999999a9a9b9b9c9c9c9d9d9e9e9f9f9f
a0a0a1a1a2a2a3a3a3a4a4a5a5a6a6a6a7a7a8a8a9a9aaaaabababacacadadae
aeafafb0b0b0b1b1b2b2b3b3b4b4b5b5b6b6b6b7b7b8b8b9b9bababbbbbcbcbd
bdbebebebfbfc0c0c1c1c2c2c3c3c4c4c5c5c6c6c7c7c8c8c9c9cacacbcbcccc
cdcdcececfcfd0d0d1d1d2d2d3d3d4d4d5d5d6d6d7d7d8d8d9d9dadadbdcdcdd
dddededfdfe0e0e1e1e2e2e3e3e4e4e5e6e6e7e7e8e8e9e9eaeaebebecededee
eeefeff0f0f1f1f2f3f3f4f4f5f5f6f6f7f8f8f9f9fafafbfcfcfdfdfefeffff
> dup length 1 sub 3 -1 roll mul dup dup floor cvi exch ceiling
cvi 3 index exch get 4 -1 roll 3 -1 roll get
dup 3 1 roll sub 3 -1 roll dup floor cvi sub mul add 255 div } bind
] def
/MatrixABC [ 0.4124 0.2126 0.0193 0.3576 0.7151 0.1192 0.1805 0.0722 0.9508 ] def
/RangeLMN [ 0.0 0.9505 0.0 1.0000 0.0 1.0891 ] def
end ] /Cs1 exch/ColorSpace dr pop
%%EndPageSetup
0.60000002 i
/Cs1 SC
1 1 1 sc
q
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
W*
0 0 39 38 rc
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
f
Q
2.0678732 w
0.40000001 0.40000001 0.40000001 sc
q
0 25.643332 m
25.422678 25.643332 l
25.422678 0.22065477 l
0 0.22065477 l
0 25.643332 l
h
W*
0 0 39 38 rc
1 0 0 -1 0 25.643332 cm
0 0 m
25.422678 0 l
25.422678 25.422678 l
0 25.422678 l
0 0 l
h
S
Q
q
0 0 39 38 rc
40 0 0 13 -1 25 cm
save
360 15 cg_miaiproc
0 -39 -39{
gsave 1 120 div 1 39 div scale 0 exch translate
currentfile 0 (EOD
)/SubFileDecode filter
L3?{flushfile}{cvx exec}ifelse
120 40 scale
BI
/Width 120
/Height 40
/BitsPerComponent 8
/Decode[
0 1
0 1
0 1
]
/DataSource ImageDataSource
/MaskedImage true
ID
EI
grestore} bind for
0 39 m 0 0 l 120 0 l 120 39 l h W n EOD
JcC<$MZ<5IL];r*PQ11Rrr7QLJcD8?nc4OHrpB]]o;$r5Z)%B%rqlTmnc8%VU&Y,QrcWj)k@VD>rdXoe
rqQBjnc4aNrnIEkgLc"Ka_(O+rb_XHrqQBjnc7DD\c;ZVrbMCCrb;A3J[*t7jK\]Zok+2[rb21@rqQBj
nc4sTrl+kMqe#hDrmT3nJcG6>rp'K/ph'Marb2(=rqQBjnc6c2dJs3Tph'MFrn`5+_uKZ7ro3p!ph'Ma
nn.mrqu?3eS,`Jeph'MMro^cjM#[J-rbq[Grb)4gmq2Roqu?3e[f>^orqubcph'MTrpG@;^An2ZrbD=B
rb;@g!+u%=rdOWSrqQBjnc5KcrqQJSph'M]rq)i_T`>#1rb)+?rbVRfph'M`rpKPnrqQBjnc5Tfrq$,D
ph'MhrqV-F^An2Cph'MFrdacUrfmEYrqH8$!G5sCq"t*^!36(umJ_P/B)\G%r.k<^s8K+pB)ZuQHh_4P
T`4ohs8McfB)_T&s7-/ls8M*YG5,\KXSDgHs2Y0=rViJbB)[,UG5,\KXSDhpp\8A"q"t*f!;QW!s8LdP
E;4&E]7L"Ks3q#IqYlcTB)[;ZEVO/F\Fon$p\8A"q"t*^!42_)dJdqYB)ZNDaPd)Ls53kUpAU!FB)[J_
D>RrEBE#j?s8McfB)_T&s7-0as1n[6`;XHIB)ZWGdt.PKs6K^anc".8B)[VcCAVWBCAuQJs8McfB)_T&
s7-0#s8KM&B)ZfLhT5_Js7cQmli)8+B)[_fB_uE@DuSGVs8McfB)_T&s7-0Os4IANWVC*)GlHlWs1\L6
jQ$=%rcS!Jrf$VarcA(ul2UbWph'O#qu?3e_Z0W5rg`aqrdXq8YlBdarnIEjqe#h?rf$Vard+S/k5YGT
ph'O#qu?3ee,T%>rqQJSph'M]rq(dA^An2[rbMCCrb2:fq.9V=rdk(<j8],Qph'O#qu?3eaT)82reC2[
rfd?WR/a)arl4qNqe#hDre:,Zreg^Ji;`fNph'O#qu?3ebQ%S/rdF`Wr+>r#rqq?I^An2Dph'MErdjiV
rfd?WnGhqVrqH2"rqQBjnc6u8roF'%ph'N,JcG]K^]4;9ph'MJrd4EPrgs,egAh0Hph'O#qu?3edJs4#
rc%XErk%_#JcF$qrr)hjph'MOrcS!Jri5tsf`(sOrqH2"rqQBjnc72>rmC^\qe#hArlBZjjo='7rqcV[
ph'MTrc7dGrjU;TrqH2"rqQBjnc7;Arl"eLqe#hDrmTR#JcFm4rqHDOph'MYrbhUFrb)5JcN!n<ph'O#
!WW2us7-0Ds8KM&B)ZfLhLY^Os763hnc"4:B)[VcCAVWBCAuN%s8McfB)_T&s7-0Gs8K"mB)[&SkJ@1L
s8N&tli);,B)[_fB_uE@DZ8;0s8McfB)_T&s763j!9=+Yr;N5]B)[;ZmXbDPs8M*YFoH"MB)[baB)ZlN
iPkirp\8A"q"t*^!9X=\q#6BMB)[VcoVqkVs8LgQE;O8HBE!kbB)[)TkedB!p\8A"q"t*^!:^$bs8MWh
LA5B[PQ(B/s1\O4df+([B)ZKCM>1]^JH##Ps8McfB)_T&s7-0Vs8MEbIJ@FRTDnbNs/uD$aSolMB)ZTF
LA5B[M#R%Zs8McfB)_T&s7-0Ys8M*YG5,YMW2K]prqV-A^A@iAph'MErdjiVrf[9Vl2T02rqH2"rqQBj
nc87\rnIEkJS+1Z\n:q`rd=KQrgj&d[f?@$ph'O#qu?3ep&G$=rbLA&JS)o6rd"Keph'N)rr1=Fj8],Q
ph'O#qu?3eq#C?3rb-jpdUpp>rdOieph'N5XoJCpph'O#qu?3eq#A6MJT':]re1/\rb)5H[f?%#rqH2"
rqQBjnc8IbJS)K*jC\CEqe#i:VuQbjph'O#qu;0
~> 0 40 m 0 39 l 120 39 l 120 40 l h W n EOD
nc8IbJS(Hbre(8`r+>r;VuQbjph'O#JcG<@JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcG!7
J,
~> restore
14 0 0 25 25 0 cm
save
126 6 cg_miaiproc
38 -37 -36{
gsave 1 42 div 1 75 div scale 0 exch translate
currentfile 0 (EOD
)/SubFileDecode filter
L3?{flushfile}{cvx exec}ifelse
42 38 scale
BI
/Width 42
/Height 38
/BitsPerComponent 8
/Decode[
0 1
0 1
0 1
]
/DataSource ImageDataSource
/MaskedImage true
ID
EI
grestore} bind for
0 37 m 0 0 l 42 0 l 42 37 l h W n EOD
JcG]KqZ-V-re1/\rl1l9rqH2"!;HTiq"t*g!<-U0K_oB\`i&k9p\8A"q"t*g!<-U0K_oB\`i&k9pAnl<
qI]a%qu?Nnrau._qe#iIVuQbjph'O#qu?Nnrau._qe#iIWrN(urqH2"rqQBjqZ-V-re1/\rl1l9rqH2"
rqQBjqZ-V-re1/\rl28DpAb-dph'O#qu?Nnrau._qe#iIVuQbjph'O#qu?Nnrau._qe#iI])V3urqH2"
rqQBjqZ-V-re1/\rl1l9rqH2"rqQBjqZ-V-re1/\rl2hTk5YGTph'O#qu?Nnrau._qe#iIVuQbjph'O#
qu?Nnrau._qe#iIb5^>urqH2"rqQBjqZ-V-re1/\rl1l9rqH2"rqQBjqZ-V-re1/\rl3Cdf)PaDph'O#
qu?Nnrau._qe#iIVuQbjph'O#qu?Nnrau._qe#iIgAfIurqH2"rqQBjqZ-V-re1/\rl1l9rqH2"rqQBj
qZ-V-re1/\rl3st`rH&4ph'O#qu?Nnrau._qe#iIVuQbjph'O#qu?Nnrau._qe#iIlMnTurqH2"rqQBj
qZ-V-re1/\rl1l9rqH2"rqQBjqZ-V-re1/\rl4O/[f?@$ph'O#qu?Nnrau._qe#iIVuQbjph'O#qu?Nn
rau._qe#iIqZ!_urqH2"rqQBjqZ-V-re1/\rl1l9rqH2"rqQBjqZ-V-re1/\!QN+Z`i&k9p\8A"q"t*g
!<-U0K_oB\`i&k9p\8A"q"t*g!<-U0K_oB\`i&k9p\8A"q"t*g!<-U0K_oB\`i&k9p\8A"q"t*i!!*'"
rau._qe#iIVuQbjph'O#qu?Nnrau._qe#iIVuQbjph'O#!WW2us8)fqB)[J\B)]fJs8McfB)_T&s8)fq
B)[J\B)]fJs8MciB)ZEAq"t*g!<-U0K_oB\`i&k9p\8A"q"t*g!<-U0K_oB\`i&h:pAt$_ph'O#qu?Nn
rau._qe#iIVuQbjph'O#qu;0
~> 0 38 m 0 0 l 42 0 l 42 38 l h W n EOD
qZ-V-re1/\rl1l9rqH2"rqQBjqZ-V-re1/\rl1l9rqH2"!;HTiq"t*g!<-U0K_oB\`i&k9p\8A"q"t*g
!<-U0K_oB\`i&k9o`8Z:qI]a%qu?Nnrau._qe#iIWrN(lrf6bcrqQBjqZ-V-re1/\rl2)?rpKc:ph'Me
rr2fpqZ-V-re1/\rl22Bro=!$ph'N!rr)WlqZ-V-re1/\rl2;E!7_,#ec'I]B)].-s8)fqB)[J\B)]fY
s8Kt9C&;NAC&Z-@s8)fqB)[J\B)]f]rrE)uZhS/3DuSATs8)fqB)[J\B)]fbs8MrqTD3$tGQ-[fs8)fq
B)[J\B)]fes8M`kO8*>dK)Y6$s8)fqB)[J\B)]fhs8MHcJbWjVOT,"7s8)fqB)[J\B)]fmrrN0"roF'%
ph'Murqt^SqZ-V-re1/\rl3.]rmq'dph'N3gAh$Mrau._qe#iIdf9:Grl4qOqe#hArl3RiqZ-V-re1/\
rl3@crj2B3rbqeeeGoCGrau._qe#iIgAh0Prqubgph'MLroDK,qZ-V-re1/\rl3[lrqHDRph'MWrpS/4
qZ-V-re1/\rl3str;ZcardsoWrf@'QbQ%G>rau._qe#iIi;`f;rc\'Krh08gaT),;rau._qe#iIlMp_\
rmq'dph'N2_Z0K5rau._qe#iIk5YG#rb;7Arb;AN^]402rau._qe#iIo)JLbrj;H4rbh_d]`7j/rau._
qe#iIn,NCbrh0$urceA&\c;O,rau._qe#iIqZ$BkrqHDRph'MVrpR;qqZ-V-re1/\rl4X2rpTi<ph'Md
rqEc!qZ-V-re1/\!QN+Z`q]T5jSjAuB)\G%r364u!<-U0K_oB\`r#f8f)BU_B)]*9s8)fqB)[J\B)]gL
s8L%;C&;NAC&Z)Ls8)fqB)[J\B)]gL[.n84DZ81^s8;ou!!*"1re1/\rd4EPrceA%U&Xuirau._nn.lP
rpQT]rVu`prau._ok+2arq;i]qZ-V-re1&Yrh'2fV#U,fqZ-V-re1/\riqXdqZ-V-re18brl(Z4mJm%`
rau.ermcu-J,
~> 0 38 m 0 36 l 42 36 l 42 38 l h W n EOD
qZ-V-reg^*N;rbTrlb<)OoL"4JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$
JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$JcC<$l2Q8
~> restore
ep
end
%%Trailer
%%EOF

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

1324
main.py

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -0,0 +1,109 @@
# -*- encoding: utf-8 -*-
"""
@File : read_bin.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/9 16:27 zart20 1.0 None
"""
# SECTOR_SIZE = 512 # 扇区大小
# BYTES_PER_LINE = 16 # 每行字节数
# # MAX_SECTORS_TO_READ = 15927 # 要读取的最大扇区数量
# MAX_SECTORS_TO_READ = 0
# # 打开设备文件
# # drive_letter = "I:" # 请替换为你要操作的磁盘
file_path = f"output.bin" # 设备文件路径
#
# try:
# with open(file_path, 'rb') as disk:
# sector_number = 0 # 起始扇区号
# byte_offset = 0 # 字节偏移量初始化
# sectors_read = 0 # 已读取的扇区数量
#
# while sectors_read <= MAX_SECTORS_TO_READ:
# # 读取扇区数据
# disk.seek(sector_number * SECTOR_SIZE)
# sector_data = disk.read(SECTOR_SIZE)
#
# # 输出扇区数据
# print(f"扇区号:{sector_number}")
# for i in range(0, len(sector_data), BYTES_PER_LINE):
# line_data = sector_data[i:i + BYTES_PER_LINE]
# print(f"{byte_offset + i:08X}:", end=" ") # 输出字节偏移量16进制
# for byte in line_data:
# print(f"{byte:02X}", end=" ") # 输出每个字节的16进制表示
#
# print() # 换行
#
# # 更新扇区号,读取下一个扇区
# sector_number += 1
# byte_offset += len(sector_data) # 累加字节偏移量
# sectors_read += 1
#
# except PermissionError:
# print("没有足够的权限来访问磁盘。请以管理员身份运行程序。")
# except FileNotFoundError:
# print(f"找不到设备文件:{file_path}")
# except Exception as e:
# print(f"发生错误:{e}")
def read_sector_0():
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
SECTORS = 0
with open(file_path, 'rb') as disk:
disk.seek(SECTORS * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
# for i in range(0, len(sector_data), BYTES_PER_LINE):
# line_data=sector_data[i:i+BYTES_PER_LINE]
# print(f"{SECTORS*32+i:08X}:", end=" ")
# for byte in line_data:
# print(f"{byte:02X}", end=" ")
# disk_dict[f"{i:08X}:"].append(f"{byte:02X}")
# print()
return SECTORS, sector_data
def read_sector_FAT1():
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
SECTORS = 34
with open(file_path, 'rb') as disk:
disk.seek(SECTORS * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
# for i in range(0, len(sector_data), BYTES_PER_LINE):
# line_data=sector_data[i:i+BYTES_PER_LINE]
# print(f"{SECTORS*32+i:08X}:", end=" ")
# for byte in line_data:
# print(f"{byte:02X}", end=" ")
# disk_dict[f"{i:08X}:"].append(f"{byte:02X}")
# print()
return SECTORS, sector_data
def read_sector_root_path(num):
SECTOR_SIZE = 512 # 扇区大小
BYTES_PER_LINE = 16 # 每行字节数
SECTORS = 15032 + num # 15032是根目录的起始扇区号
with open(file_path, 'rb') as disk:
disk.seek(SECTORS * SECTOR_SIZE)
sector_data = disk.read(SECTOR_SIZE)
# for i in range(0, len(sector_data), BYTES_PER_LINE):
# line_data=sector_data[i:i+BYTES_PER_LINE]
# print(f"{SECTORS*32+i:08X}:", end=" ")
# for byte in line_data:
# print(f"{byte:02X}", end=" ")
# print(f"{chr(byte)}", end="")
# print()
# print(sector_data)
return SECTORS, sector_data
if __name__ == '__main__':
read_sector_0()
read_sector_FAT1()
read_sector_root_path(0)

@ -0,0 +1,2 @@
numpy==1.26.0
Pillow==10.0.1

@ -0,0 +1,35 @@
import random
BLOCK_NUM = 7
LAST_BLOCK = "FF"
FIRST_BLOCK = 8 # 第一块fat位置
def generate_chain_structure():
sim_fat = ["0"] * BLOCK_NUM # 文件块的大小
used_blocks = {"00", FIRST_BLOCK} # 用于存储已经被占用的块位置,且预置00块和第一块为已占用状态
for i in range(len(sim_fat) - 1):
while True:
location = random.randint(0, 99)
if location not in used_blocks: # 防止已经被占用的快被重新占用
sim_fat[i] = location
used_blocks.add(location) # 添加到已占用块集合
break
sim_fat[-1] = LAST_BLOCK
chain_structure = [] # 链结构
for i, value in enumerate(sim_fat):
if i == 0:
print(f"SimFAT[{FIRST_BLOCK}] -> {value}")
item = {FIRST_BLOCK: value} # 构建链结构
else:
print(f"SimFAT[{sim_fat[i - 1]}] -> {value}")
item = {sim_fat[i - 1]: value} # 构建链结构
chain_structure.append(item) #
return chain_structure
if __name__ == "__main__":
print(generate_chain_structure())

@ -0,0 +1,89 @@
# -*- encoding: utf-8 -*-
"""
@File : test.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/7 11:20 zart20 1.0 None
"""
char = "A"
hex_value = hex(ord(char))
print(f"The hexadecimal value of '{char}' is {hex_value}")
def char_to_hex(st):
hex_value = hex(ord(st))
print(f"The hexadecimal value of '{st}' is {hex_value}")
def hex_to_char(hex):
char = chr(int(hex, 16))
print(f"The character represented by '{hex}' is '{char}'")
"""
真实磁盘的读写以标称64GB的U盘为例查看磁盘记录信息的工具是WinHex
将一块64GB的U盘接入电脑为了方便查看结果先将用磁盘工具如DiskGenius将U盘格式化
注意格式化时文件系统选择FAT32簇大小选择64KB
此时用管理员权限打开WinHex
"""
import pandas as pd
# 创建一个空的DataFrame
df = pd.DataFrame(columns=["Name", "Age"])
# 创建一个字典
new_data = {"Name": "John", "Age": 30}
# 使用append方法将字典添加到DataFrame中
df = df.add
# 打印DataFrame
print(df)
import tkinter as tk
import tkinter.font as tkFont
def open_file():
# 在这里添加打开文件的功能
pass
def save_file():
# 在这里添加保存文件的功能
pass
def exit_app():
root.quit()
root = tk.Tk()
root.title("菜单栏字体大小示例")
# 创建自定义字体
custom_font = tkFont.Font(family="Helvetica", size=16) # 修改字体和大小
# 创建菜单栏
menubar = tk.Menu(root, font=custom_font)
root.config(menu=menubar)
# 创建文件菜单
file_menu = tk.Menu(menubar, tearoff=0, font=custom_font)
menubar.add_cascade(label="文件", menu=file_menu)
# 在文件菜单中添加选项
file_menu.add_command(label="打开", command=open_file)
file_menu.add_command(label="保存", command=save_file)
file_menu.add_separator()
file_menu.add_command(label="退出", command=exit_app)
# 运行主循环
root.mainloop()

@ -0,0 +1,48 @@
# -*- encoding: utf-8 -*-
"""
@File : time_jx.py
@License : (C)Copyright 2021-2023
@Modify Time @Author @Version @Description
------------ ------- -------- -----------
2023/10/10 14:30 zart20 1.0 None
"""
# 时间解析
def time_parse(time_bytes):
# 从两个字节中解析时间信息
time_bytes = b'\x29\x8B' # 用于演示的两个字节数据
raw_time_value = int.from_bytes(time_bytes, byteorder='little') # 将两个字节合并为一个整数
# 提取小时、分钟和秒
hour = (raw_time_value >> 11) & 0x1F # 前11位表示小时
minute = (raw_time_value >> 5) & 0x3F # 接下来的5位表示分钟
second = (raw_time_value & 0x1F) * 2 # 最后的5位表示秒以2秒的粒度存储
print(f"{hour}:{minute}:{second}")
def date_parse(date_bytes):
import datetime
date_bytes = b'\x47\x57' # 用于演示的两个字节数据
raw_date_value = int.from_bytes(date_bytes, byteorder='little') # 将两个字节合并为一个整数
# 提取年份、月份和日期字段
year_offset = (raw_date_value >> 9) & 0x7F # 取前7位作为年份的偏移值
month = (raw_date_value >> 5) & 0x0F # 取接下来的4位作为月份
day = raw_date_value & 0x1F # 取最后的5位作为日期
# 计算实际年份
year = 1980 + year_offset
# 创建日期对象
date = datetime.date(year, month, day)
# 打印可读的日期表示
print("日期:", date.strftime("%Y-%m-%d"))
if __name__ == '__main__':
time_parse(b'\x29\x8B')
date_parse(b'\x47\x57')
Loading…
Cancel
Save