Questions tagged [pen]
118 questions
0
votes
2 answers
How do I use a pen in Java?
In school, we used TurtleGraphics.jar in Eclipse. The teacher told us how to draw an arrow(pen.up(); and pen.move(90);)
I understand now that you need to actually create a class for "pen." I thought it already came with Java.
Online, I've only found…

TwixPasta
- 11
- 3
0
votes
1 answer
Drawing lines to image from a txt file. Pen thickness is too large.
Let me describe an issue that is taking me more than one day to solve so far. I am inputting a series of lines from a text file and I want to draw a picture with them. The thing is that two of these lines are too close (1 pixel distance) which is a…

user3641829
- 261
- 2
- 11
0
votes
1 answer
PyQT: draw a QPainterPath() in rect?
With Qt, if you use QPainter.drawText() you can pass a string of characters you want to draw and coordinates of the bounding rect as argument. However when drawing a path with QPainter.drawPath() you can't just specify a bounding rect or…

blameless75
- 2,148
- 2
- 19
- 14
0
votes
1 answer
GDI : Get LOGPEN from HGDIOBJ or HPEN
I would like to get LOGPEN structure for currently using HGDIOBJ(which is actually HPEN). Lets assume we have something like this:
CPen ColoredPen;
ColoredPen.Create(...);
...
HGDIOBJ PriorPen = SelectObject(PaintingDC, ColoredPen);
Now I need to…

IKM2007
- 716
- 1
- 8
- 31
0
votes
1 answer
Samsung Pen text recognition returns errors for german language
I am working on an Android App, that uses the Samsung Pen sdk to recognizes handwritten words.
I worked through the tutorials and got the recognition to work, but when I use the german language instead of korean (which is used in the example) I get…
user3471768
0
votes
1 answer
Draw Lines Between Points Contained in a Vector (VC++)
I want to draw line segments between points contained in a vector and display them in a window.
Currently, this is what I have:
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
//Draw lines to screen.
using std::vector;
using…

Robbie Capps
- 417
- 1
- 5
- 16
0
votes
2 answers
C# Line Painting Problems
I need help drawing a line on a WinForm.
The code I currently have is mostly pulled off of MSDN:
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BouncingBall
{
public partial class Form1 :…

carreter
- 25
- 7
0
votes
1 answer
Can a Pen or Brush paint a Point?
I know that I can draw a filled circle and I can draw many simple and complicated things with a Graphics. But I couldn't get it to draw a single point (not a single pixel).
I'm playing with a Paint program and the user can draw fine but not plot a…

TaW
- 53,122
- 8
- 69
- 111
0
votes
1 answer
User re-login with batch file
I have a batch file that modifies a registry entry. However, the changes do not get applied until the user does log-off and relog-in.
Is there any way that I can perform a relogin of the user automatically in the batch file?
Some more background…

Joel Bodenmann
- 2,152
- 2
- 17
- 44
0
votes
3 answers
Assigning Pens doesn't work as expected
I am trying to create pens for use in my windows form and I am having issues with the code working properly. The pens are not painting as specified. The code snippets in question are below.
If I create the pens as follows
System.Drawing.Pen aPen =…

PBrenek
- 561
- 1
- 8
- 24
0
votes
2 answers
Lines not drawing to picture box every time
When my code runs only about 1/3 of the time it will actually draw properly, the rest it will just not draw some of the lines.
Pen pen = new Pen(Color.Black);
Graphics graphics = MainFrm.HangmanImage.CreateGraphics();
switch…

user1763295
- 860
- 3
- 16
- 34
0
votes
1 answer
Error with Pen C#
I did a system to select an area using the mouse.
However, when I select the area looks like:
Sorry my english, i'm brazilian...
My Code:
private void ResizeSelection()
{
if (CurrentAction == ClickAction.LeftSizing)
{
…

Marlon Roberto Colhado
- 99
- 1
- 8
0
votes
2 answers
WPF Drawing context
In my wpf application i am drawing a lot of geometries as below. My requirement is to change the color of drawingvisual with out redrawing it? any possibilities in wpf?
using (DrawingContext vDrawingContext = vDrawingVisual.RenderOpen())
…

PropertyChangedEventHandler
- 128
- 2
- 13
0
votes
1 answer
0
votes
1 answer
Adobe Flash - starting path from existing anchor
How can I start a new pen path from existing anchor point of a already CLOSED shape? (Adobe Flash)

user1590642
- 199
- 3
- 13