graphics

How can I force any display resolution/timing I want?

依然范特西╮ 提交于 2019-12-30 13:26:24
问题 I am having trouble finding a way to force any display resolution/timing I want in my C# program. I am running Windows 7 with a GeForce 210 graphics card. My current method to achieve these custom resolutions is to use the driver GUI to manually add the custom resolutions and then use Windows calls to change to those resolutions but I need a way to add new custom resolutions in real time. I have looked into the NVAPI but I was not able to find a way to do this. I also looked into the command

Difference between Graphics object of getGraphics and paintComponent

谁说胖子不能爱 提交于 2019-12-30 12:13:15
问题 If I'm working with a JPanel, what's the difference between the Graphics object returned by getGraphics, and the Graphics object that is passed in paintComponent method? 回答1: getGraphics Can be null Is a "snap shot" of the last paint process Anything painted to it will be lost on the next paint cycle You should avoid using getGraphics and simply use what is past to the paintComponent method. In theory, there is no difference between them, but if you want what you have painted to survive

AS3: beginGradientFIll() doesn't make me a gradient!

*爱你&永不变心* 提交于 2019-12-30 11:29:28
问题 I'm trying to render a circle with a radial gradient but I can't seem to figure it out. var bkgdGrad:Shape = new Shape(); bkgdGrad.graphics.beginGradientFill(GradientType.RADIAL, [0x0000FF, 0x00FF00], [1, 1], [0, 255],null,"pad"); bkgdGrad.graphics.drawCircle(0,0,r+200); bkgdGrad.graphics.endFill(); this.addChild(bkgdGrad); The above code renders a solid green circle for me. If I change the array after the colors to [1,0] (the alpha array) I get a transparent fill. I can't seem to get flash

setPolyToPoly not applied

≡放荡痞女 提交于 2019-12-30 10:54:09
问题 Can anyone help me with a graphics issue I am having. This code does not apply the setPolyToPoly at all.. it does the Camera rotation, but not the polyToPoly transformation .. I dont understand why.. final Camera camera = mCamera; final Matrix matrix = t.getMatrix(); camera.save(); camera.translate(x, y, z); camera.getMatrix(matrix); camera.restore(); matrix.setPolyToPoly(sourceArr, 0, destArr, 0, sourceArr.length >> 1); matrix.preTranslate(-0, -height); matrix.postTranslate(0, height); 回答1:

How to draw a selectable line?

不打扰是莪最后的温柔 提交于 2019-12-30 10:53:08
问题 I want to create an application which the user is able to manipulate the line he draw. Something like Deleting the line or Selecting it. How should I do that? Thanks in advance I managed to do it using a hard coded rectangle. But I don't still have an idea how to do it using the drawLine() Can I use drawPath to do the hit test? Here is the code: private bool selectGraph = false; private Rectangle myrec = new Rectangle(50, 50, 100, 100); private Graphics g; private void panel1_Paint(object

setPolyToPoly not applied

北城以北 提交于 2019-12-30 10:51:35
问题 Can anyone help me with a graphics issue I am having. This code does not apply the setPolyToPoly at all.. it does the Camera rotation, but not the polyToPoly transformation .. I dont understand why.. final Camera camera = mCamera; final Matrix matrix = t.getMatrix(); camera.save(); camera.translate(x, y, z); camera.getMatrix(matrix); camera.restore(); matrix.setPolyToPoly(sourceArr, 0, destArr, 0, sourceArr.length >> 1); matrix.preTranslate(-0, -height); matrix.postTranslate(0, height); 回答1:

Some help rendering the Mandelbrot set

流过昼夜 提交于 2019-12-30 10:25:31
问题 I have been given some work to do with the fractal visualisation of the Mandelbrot set. I'm not looking for a complete solution (naturally), I'm asking for help with regard to the orbits of complex numbers. Say I have a given Complex number derived from a point on the complex plane. I now need to iterate over its orbit sequence and plot points according to whether the orbits increase by orders of magnitude or not. How do I gather the orbits of a complex number? Any guidance is much

How to construct a chart from a table?

自闭症网瘾萝莉.ら 提交于 2019-12-30 10:03:04
问题 Good day! Very grateful for any help! How to write a script (php or javascript) which will work as a constructor of charts, where input values ​​are the values ​​from the table, which is derived from the database to the page? The input data in the chart will be data from MS SQL tables. (Displayed on the html page. The script does not query the database, it just takes the passed array.) The input data in the script to be displayed next to the checkbox. A Select is made by marking different

How to construct a chart from a table?

a 夏天 提交于 2019-12-30 10:02:09
问题 Good day! Very grateful for any help! How to write a script (php or javascript) which will work as a constructor of charts, where input values ​​are the values ​​from the table, which is derived from the database to the page? The input data in the chart will be data from MS SQL tables. (Displayed on the html page. The script does not query the database, it just takes the passed array.) The input data in the script to be displayed next to the checkbox. A Select is made by marking different

Algorithm to calculate the shortest path between two points on the surface of a 3D mesh

旧城冷巷雨未停 提交于 2019-12-30 09:38:10
问题 I am looking for an algorithm to calculate the following: I have: A 3D triangle mesh. The triangles do not necessarily lie in one plane. The angle between the norm vectors of two neighbouring triangles is less then 90 degrees. Two points. The two points lie either on an edge of the triangle mesh or inside a triangle of the mesh. I need to calculate the polyline which represents the shortest path between the two points on the mesh. What is the simplest and/or most effective strategy to do this