在Javascript中在图像上绘制网格线 [英] draw grid lines over an image in Javascript

查看:186
本文介绍了在Javascript中在图像上绘制网格线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿那里,


我在浏览器窗口中有一个大图像,我想要一种方法来覆盖网格线上的
叠加网格线图像,所以用户可以显示网格或

隐藏网格线。网格将覆盖100%的图像,并且所有我需要的是图像上方的一组水平和垂直线。

创建网格覆盖


有没有办法可以利用Javascript中的某些功能来实现

这个?我不能使用任何服务器端的第三方组件,而且我会使用服务器端的东西,比如GDI +,通过

ASP.NET,而不是
。 br />

谢谢,


Christian

Hey there,

I have a large image in a browser window, and I would like a way to
overlay grid lines on top of the image, so a user can show the grid or
hide the grid lines. The grid would cover 100% of the image, and all I
would need is a set of horizontal and vertical lines over the image to
create a grid overlay

Is there a way I can leverage some functionality in Javascript to do
this? I can''t use any server side 3rd party components, and I would
rather not do this using something on the server side like GDI+ through
ASP.NET.

Thanks,

Christian

推荐答案

ka******@hotmail.com 写道:

嘿那里,


我在浏览器窗口中有一个大图像,我想要一种方法来支持
叠加网格线图像,所以用户可以显示网格或

隐藏网格线。网格将覆盖100%的图像,并且所有我需要的是图像上方的一组水平和垂直线。

创建网格覆盖


有没有办法可以利用Javascript中的某些功能来实现

这个?我不能使用任何服务器端的第三方组件,而且我会使用服务器端的东西,比如GDI +,通过

ASP.NET,而不是
。 br />

谢谢,


Christian
Hey there,

I have a large image in a browser window, and I would like a way to
overlay grid lines on top of the image, so a user can show the grid or
hide the grid lines. The grid would cover 100% of the image, and all I
would need is a set of horizontal and vertical lines over the image to
create a grid overlay

Is there a way I can leverage some functionality in Javascript to do
this? I can''t use any server side 3rd party components, and I would
rather not do this using something on the server side like GDI+ through
ASP.NET.

Thanks,

Christian



我不认为javascript会能够做到这一点,但似乎有可能

with css。

I don''t think javascript will be able to do the job, but seems possible
with css.



ka ****** @ hotmail.com 写道:

嘿那里,


我在浏览器窗口中有一个大图像,我想要一种方法来在图像顶部叠加网格线,这样用户就可以显示网格或

隐藏网格线。网格将覆盖100%的图像,并且所有我需要的是图像上方的一组水平和垂直线。

创建网格覆盖


有没有办法可以利用Javascript中的某些功能来实现

这个?我不能使用任何服务器端的第三方组件,而且我会使用服务器端的东西,比如GDI +,通过

ASP.NET,而不是
。 br />

谢谢,


Christian
Hey there,

I have a large image in a browser window, and I would like a way to
overlay grid lines on top of the image, so a user can show the grid or
hide the grid lines. The grid would cover 100% of the image, and all I
would need is a set of horizontal and vertical lines over the image to
create a grid overlay

Is there a way I can leverage some functionality in Javascript to do
this? I can''t use any server side 3rd party components, and I would
rather not do this using something on the server side like GDI+ through
ASP.NET.

Thanks,

Christian



这里是''的证明概念''类型页面 - 仅测试firefox
http ://em.hopto.org/code/test/javascript/grid.html

Here''s a ''proof of concept'' type page - firefox tested only
http://em.hopto.org/code/test/javascript/grid.html



ka ****** @ hotmail.com 写道:

嘿那里,


我在浏览器窗口中有一个大图像,我想要一种方法来在图像顶部叠加网格线,这样一个用户可以显示网格或

隐藏网格线。网格将覆盖100%的图像,并且所有我需要的是图像上方的一组水平和垂直线。

创建网格覆盖


有没有办法可以利用Javascript中的某些功能来实现

这个?我不能使用任何服务器端的第三方组件,而且我会使用服务器端的东西,比如GDI +,通过

ASP.NET,而不是
。 br />

谢谢,


Christian
Hey there,

I have a large image in a browser window, and I would like a way to
overlay grid lines on top of the image, so a user can show the grid or
hide the grid lines. The grid would cover 100% of the image, and all I
would need is a set of horizontal and vertical lines over the image to
create a grid overlay

Is there a way I can leverage some functionality in Javascript to do
this? I can''t use any server side 3rd party components, and I would
rather not do this using something on the server side like GDI+ through
ASP.NET.

Thanks,

Christian



现在我想到了:最好的创建一个表并将其覆盖在

图像上。你得到一个漂亮的网格图案,如果你想开始操作网格或用

颜色填充它们,那么使用

会更容易。希望能给你一些想法。

Now that I think of it: best to create a table and overlay it on the
image. You get a nice grid pattern, and it would be easier to work with
if you want to start manipulating the grids or filling them in with
colors. Hope that gives you some ideas.


这篇关于在Javascript中在图像上绘制网格线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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