Questions tagged [drawing2d]

110 questions
0
votes
0 answers

Draw circle using Flatten function

I'm curently implementing a circle visualization using X points in Input. I don't know if it's the best way (do not hesitate to tell me about any other possibility) but to realize that, i'm creating a Path with these differents points and then i use…
Toto NaBendo
  • 290
  • 3
  • 26
0
votes
1 answer

Java: Pixel-perfect drawing on JPanel

I'm using OpenJDK 11: openjdk version "11.0.1" 2018-10-16 OpenJDK Runtime Environment 18.9 (build 11.0.1+13) OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode) Trying to make an app drawing something in JPanel I noticed some annoying…
Michał B.
  • 51
  • 2
0
votes
0 answers

How to fill ellipses with different colors using GraphicsPath in WinForms?

To solve flickering problem in WinForms when drawing multiple shapes, I decided to use GraphicsPathdo draw all shapes and then render using Graphics. It works perfectly; drawing never flickers even if a high number of shapes are drawn. panel.Paint…
ozgur
  • 2,549
  • 4
  • 25
  • 40
0
votes
1 answer

TabControl with current tabpage triangle

I need to modify this tabcontrol i found online, if i change the item height, the triable does not adjust properly The code doing the drawing is G.SmoothingMode = SmoothingMode.HighQuality Dim p() As Point = {New…
Smith
  • 5,765
  • 17
  • 102
  • 161
0
votes
0 answers

Camera preventing correct rotation of player to face mouse

I am currently working on a 2d game and I want the player to be able to move around the world freely and always "face/look at" the mouse. To implement this I made a Camera which translates everything in relation to the player: x =…
user9489163
0
votes
1 answer

How to rotate object to always face mouse?

I'm trying to make a game and I need the player(rectangle) to always be looking at the mouse, I have found some pages on this but I can't seem to understand the math. Main: g2d.rotate(calculateRotation, x,y); g2d.fill(player); …
user9489163
0
votes
0 answers

Moon illumination and phaseangle or direction

Calculating the phase of the Moon is pretty straightforward. I'm not asking that. The moon actually changes its phase-angle and illumination because of librations and other factors. (see here for the moon phases for 2011:…
Danny F
  • 392
  • 8
  • 21
0
votes
1 answer

Interactive Drawing in Python

First of all. I already have some code running on python and PyQt in which the user draws an image and the program returns the drawed image. What I would like to do is to let the user modify the drawing once he has finished. For example he can click…
Migui Mag
  • 187
  • 1
  • 3
  • 13
0
votes
1 answer

Drawing shapes javascript

I have a web project that I have to create a virtual screen for example screen for mobile pc, in this screen I want to partition it into zones to subsequently assign displays on these areas, are they javascript libraries that facilitate drawing and…
user8392611
0
votes
1 answer

Linewidth increases when zooming in on vector drawing .NET

When zooming in on a vector drawing in Visual Basic .NET, after a certain point the lines get thicker with each zoom action. App functionality is basically to draw some lines: a graphics matrix is set using transformation and scaling to get the…
etri
  • 99
  • 8
0
votes
1 answer

OSX Swift , Draw a simple line with a push of a button

Have looked a lot for this but nothing found to match. Real simple I want to draw a line buy a push of a button. I have a class which is from NSView to do the drawing, this monitors a var and if it changes to redraw the view. I can get the mouse…
HelpWoody
  • 13
  • 2
0
votes
1 answer

Drawing 2D maps in JavaFX

I'm currently working on project that uses json file with points & polygons. All input data are a Lat/Lon format. I wish to draw these on a map (Which should be able to pan). I'm able to draw these objects on a JavaFx Pane or Canvas. The issue is…
DouglasDC3
  • 495
  • 2
  • 12
0
votes
2 answers

Calling a function that involves PaintEventArgs when a button is clicked

Sorry if this has been asked before. I was working on a simple connect 4 game in C# windows forms as I haven't done any work involving graphics before. To do this I need the program to draw circles when a button is pressed however I don't know how…
Alex McKinney
  • 51
  • 2
  • 9
0
votes
2 answers

Organization chart algorithm

Does anyone have a line on an algorithm to place boxes in an organizational chart? Any language is fine.
Bill
  • 305
  • 6
  • 25
0
votes
1 answer

Merge an image, a background and Text into a single image

I found this code here: Private _BackgroundColours As New List(Of String)() From { _ "339966", _ "3366CC", _ "CC33FF", _ "FF5050" _ } Public Function GenerateRactangle(firstName As String, lastName As String) As MemoryStream Dim…
StealthRT
  • 10,108
  • 40
  • 183
  • 342