将文本文件转换为彩色地图 [英] convert text file to a colored maps

查看:124
本文介绍了将文本文件转换为彩色地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

任何人都可以帮助我如何在文本文件下方轻松地将其转换为带有X和*且+带有颜色的正方形的图形作为绘图.它看起来像是带有颜色的图形以便于查看.

* XX * XXX *
** XXXX * XXXXX **
* XXXXXX * XXXXXXX *

抱歉,我无法粘贴示例图.
谢谢.
br,
乔治

感谢您有意帮助我.我是刚开始使用gdi进行绘图编程的新手.该程序的目的是我想将文本文件转置为彩色的输出,如下面的输出所示.但是彩色框内是X或*.

Hi Guys,

Could anyone help me how to convert in easy manner below text file as drawing using squares with X and * inside + with color.It mus appear graphical with color for easy view.


*XX*XXX*
**XXXX*XXXXX**
*XXXXXX*XXXXXXX*

Sorry i can t paste the sample drawing.
Thanks.
br,
george

Thanks for your intention to help me. I am new to programming specially to drawing using gdi. The purpose of the program is i want to transpose the text file into colored one like below ouput. But inside the colored box is the X or *.

推荐答案

绘图在哪里?使用哪些库?
你到底在哪里卡住?因为到目前为止,您尚未提供任何有关您的确切问题的信息.
Drawing where ? Using which libraries ?
Where are you stuck precisely ? Because for now, you didn''t provide any information on what your exact problem is.


我删除了实际上是另一个问题的答案"并将其粘贴到您的原始帖子中通过编辑按钮.现在,当我回复时,我可以看到你写的所有内容

如果您是编程新手,那么尝试这可能是一项艰巨的任务,为什么要这么做呢?

话虽如此,跨过一个字符串并画出大小相同的不同颜色的盒子并不难.我想象您将有一个嵌套的for循环,使用这些变量将其索引到文本方块中,然后使用这些相同的值来计算平方并根据文本内容设置颜色.
I deleted your ''answer'' that was really another question and pasted it into your original post via the edit button. Now I can see all you wrote as I reply

If you''re new to programming, then this is probably a difficult task to attempt, why are you doing it ?

Having said that, it''s not that hard to step over a string, and draw boxes of different colors that are all the same size. I''d imagine you''d have a nested for loop, use those variables to index into your text square, then you''d use those same values to calculate the square and set the color based on the text content.


gfaz写道:

感谢您的帮助.我是刚开始使用gdi进行绘图编程的新手.该程序的目的是我想将文本文件转置为彩色的输出,如下面的输出所示.但是彩色框内是X或*.

Thanks for your intention to help me. I am new to programming specially to drawing using gdi. The purpose of the program is i want to transpose the text file into colored one like below ouput. But inside the colored box is the X or *.



好吧,您只是重复了您已经说过的话.但是您仍然没有回答以下问题:您正在使用哪个图形库"进行渲染?纯MFC,OpenGL,DirectX,... ...
您也没有回答其他问题:您到底在哪里卡住了?我们无法为您提供完整的代码,因此您的问题越模糊,答案就越模糊.如果您想要一个明确的答案,请提出一个明确的问题(并记住我们不会给您完整的编码").



Well, you simply repeated what you already said. But you still didn''t answer the questions: which "graphical library" are you using for the rendering ? Pure MFC, OpenGL, DirectX, ... ?
Also you didn''t reply to the other question: where are you stuck exactly ? We can''t provide you with the full code, so the more vague your question is, the more vague the answer will be. If you want a clear answer, ask a clear question (and keep in mind that we won''t give you "the full codez").


这篇关于将文本文件转换为彩色地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆