{"id":16724545,"url":"https://github.com/yunwei37/graphics-zju","last_synced_at":"2025-06-21T07:41:48.693Z","repository":{"id":105837270,"uuid":"213906775","full_name":"yunwei37/graphics-zju","owner":"yunwei37","description":"浙江大学c语言程序设计专题用的图形库的一个重构和改进版本（以及简单的CAD）","archived":false,"fork":false,"pushed_at":"2019-10-26T16:37:07.000Z","size":1838,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T14:41:25.313Z","etag":null,"topics":["cad","course-project","win32api","zju"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yunwei37.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-09T12:01:22.000Z","updated_at":"2021-05-09T12:28:12.000Z","dependencies_parsed_at":"2023-06-14T09:00:15.995Z","dependency_job_id":null,"html_url":"https://github.com/yunwei37/graphics-zju","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yunwei37/graphics-zju","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fgraphics-zju","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fgraphics-zju/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fgraphics-zju/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fgraphics-zju/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunwei37","download_url":"https://codeload.github.com/yunwei37/graphics-zju/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunwei37%2Fgraphics-zju/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261087996,"owners_count":23107655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","course-project","win32api","zju"],"created_at":"2024-10-12T22:45:40.840Z","updated_at":"2025-06-21T07:41:43.665Z","avatar_url":"https://github.com/yunwei37.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# （一个不知道叫啥名字好的简易版图形库）\n\u003cp\u003e大一下尝试用纯c语言实现一些面向对象的概念的试验品\u003cdel\u003e（牺牲品）\u003c/del\u003e\u003c/p\u003e\n\u003cp\u003e底层使用win32 api实现，大概不能跨平台但是也许穿越时空还是可以的（二十年前的老玩意了。。。）\n\u003cp\u003e对我个人而言最大的意义是...大概比较简略地体会了一下软件开发的一些流程，比如需求分析、系统设计、实现、单元测试、集成测试什么的...\n\u003cp\u003e并且我在尝试尽量有良好的代码风格、实现系统可扩展性、高内聚低耦合之类的...( 之前搞得什么垃圾解释器和搜索引擎算法还行，实现简直是shit....\n\n希望能做到，和原先《c语言的科学和艺术》中提供的图形库相比，在底层方面更加贴近原生api的实现方式，牺牲一部分的封装和对老硬件的兼容性，带来更丰富的api接口和更快的运行速度；在上层，提供面向对象形式的进一步抽象和封装，使对复杂gui应用的构建更为便利。\n\n- 语言：c语言\n- 开发环境 vs2017\n- 本图形库主要由两个部分构成：\n\n        第一部分是graphics库，基于《c语言的科学和艺术》中提供的图形库，以及翁凯老师在中国大学mooc c语言程序设计进阶课程中提供的ACLlib库\n        （github地址：https://github.com/wengkai/ACLLib/）\n        同时参考了刘新国老师对于书中图形库的改进版本进行编写。其中，本图形库的主要绘图逻辑使用acllib中的绘图函数并稍作改动，并在此基础上实现了大部分书中的其他api接口（如字体属性、大小，绘图信息保存与重载，窗口信息设定与获取等等）；同时添加和封装了一些其他功能，如更简单的文字绘制函数、声音函数，菜单创建函数等等。\n        如果您是graphic的用户，值得注意的是，在坐标系的选择上，本库的实现最后还是采用了屏幕坐标系而非自然坐标系，即以左上角为原点，向下为y轴正方向，向右为x轴正方向。\n         第一部分的库可以在不使用第二部分的库的基础上独立使用。\n\n         第二部分是engine库，是一个基于graphics、从面向对象的概念出发的图形库：本实现将所需要绘制的gui单元视为一个对象（object），每个对象有自己的结构属性、绘图方式、对于外界信号的响应方式，以及附加信息；对象可以向系统注册或者删除所需要接受的信号模式；对象可以组成对象组，对象组也可以作为某个对象的成员；对象和对象之间可以通过回调函数，也可以通过信号与槽的方式进行多对多的通信。\n         由于时间紧迫，这个库的实现方式其实大部分是自己意淫出来的（划掉），其中一些想法来源于java的swing组件，另一些大概来自于windows的回调函数、消息队列机制，以及qt库等等gui实现。同时自己使用gui编程、面向对象编程的经验也不很丰富，win32 api也是看了两天一本书都没翻完就开始写的（不过我觉得它可能理论意义远大于实际意义了），因此难免会有不少疏漏和设计的缺陷，恳请诸公不吝赐教。\n\n具体使用方法以及实现，请移步相关文档。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fgraphics-zju","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunwei37%2Fgraphics-zju","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunwei37%2Fgraphics-zju/lists"}