dcsimg

Search:

Type: Posts; User: boops boops

Page 1 of 13 1 2 3 4

Search: Search took 0.63 seconds.

  1. Replies
    9
    Views
    447

    Re: [RESOLVED] Gradient along a curve

    Changing the colour instead of changing the pen improves performance quite a bit, for example:


    Using pn As New Pen(Color.Empty, 5)
    pn.Color = Color.FromArgb(red, 0, blue)
    ...
  2. Replies
    9
    Views
    447

    Re: Gradient along a curve

    Here's a quick example of how it could be done. Assume you have an array of points called points() to define the curve, and you are drawing on a form called Form1;). When you refresh or invalidate...
  3. VS 2019 Re: Deletion of current image impossible as it is being used by another process

    The pattern is becoming clear. Our 'methods' are really similar to Passel's:

    1. Get the image from a file (Passel's b1, your FileStream, my Image.FromFile).
    2. Copy the image from step 1...
  4. VS 2019 Re: Deletion of current image impossible as it is being used by another process

    Hi BartH,

    I hadn't looked at your code because my reply was meant as a footnote to Passel's recommendation. I wasn't offering you a method you can simply paste into your present code.

    Passel's...
  5. VS 2019 Re: Deletion of current image impossible as it is being used by another process

    It's amazing how tenacious System.Drawing is in keeping its grubby grip on the image. After some experimentation, however, I found a more concise way to do it:



    Dim img As Image =...
  6. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Here's a Zip file with the new GraphicsPathEqualizer.vb class: 174427

    You can display the fixed corners (I call them inflections in the code) like this :


    For Each p as PointF in...
  7. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Hi tucoali and others,
    If anyone is still interested, I've made a new version of the GraphicsPathEqualizer that resolves the "broken corners" problem. Reply here if you want a copy. BB
  8. Re: Why does my label not show a text ?

    Hi Poppa,

    If you have a TextBox with text added in the Form Designer, it will raise a TextChanged event as soon as you run the code. The event is raised from the InitializeComponent sub, and it...
  9. Re: my nearest neighbor example is not working as expected

    Hi zpix, it's not surprising your resized image doesn't look the same as Gimp, because your code doesn't implement the nearest neighbour algorithm. And Gimp presumably does.

    When you make an...
  10. Replies
    14
    Views
    391

    Re: How to pronounce gif

    Be careful what you wish for. In Dutch, "gif" is also pronounced with a hard g, which is like the ch in Loch Lomond. And it means "poison". BB
  11. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Try reducing the minimum spacing, for example to 5 or less. That will have to suffice for the while, until the "lost corners" bug is completely resolved. BB

    edit: and the maximum spacing, too.
  12. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Yes, we should identify the vertices in the (flattened) source path. But they can't be inserted arbitrarily. The points must be correctly integrated into the code that builds the Result path so that...
  13. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    You invisible point isn't very visible -- partly but not entirely due to VB Forums' characteristic blurriness;). The real problem, however, is that I can't reproduce defect using the same font and...
  14. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Not much. However, you are drawing the path, not the path points! The yellow dots are the way I chose to show where the path points are.

    I meant the values of MinSpacing and MaxSpacing to be...
  15. VS 2017 Re: Randomising (an array) without repeats VB.net

    A stack's my personal preference because the word "Dequeue" is harder to spell than "Pop". It's so tinny:D BB
  16. VS 2017 Re: Randomising (an array) without repeats VB.net

    Concise is nice. So are Queues but I prefer a Stack: after all, who wants to Dequeue something when you can just as easily Pop it?

    So here's how I would code it, assuming we start with an array...
  17. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Here's a solution which I think will do the job. I've designed a "GraphicsPathEqualizer" Class to convert a normal GraphicsPath into a path with points spaced at fairly regular intervals along the...
  18. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Thanks, tucoali, that makes things a bit clearer. Interpolating extra points along a straight line is itself largely a matter of fairly simple geometry, but it will take some work to get the whole...
  19. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Not necessarily. You can add the text to a GraphicsPath with GraphicsPath.AddString, then draw it with Graphics.DrawPath. The result is similar to DrawString but the GraphicsPath remains available...
  20. Thread: GDI+ Font

    by boops boops
    Replies
    27
    Views
    1,270

    VS 2019 Re: GDI+ Font

    Hi tucoali,

    It's easy enough to draw dotted text programmatically: draw the text in GDI+ using a dotted pen (as in post #8 of the thread you visited on the Graphics and Games forum), or use a...
  21. Replies
    17
    Views
    20,234

    Re: Font to G-Code CNC VB2005E

    Sorry tucoali, I am getting a bit rusty! I forgot that flattening doesn't guarantee equal segments. The vertices will always be more crowded in sharp curves, and straight-line segments won't be...
  22. Re: looking for a way to make this sub faster...

    Hi Jumper, just a thought (in other words, I don't have time to test it properly).

    I've noticed in the past that getting an exception can slow down code performance massively, whether or not you...
  23. Replies
    17
    Views
    20,234

    Re: Font to G-Code CNC VB2005E

    Hi tucoali, I think that what you need is the GraphicsPath.Flatten method. What this does is approximate each curve in the graphics path to a succession of straight line segments.

    In Steinie's...
  24. Replies
    19
    Views
    1,207

    Re: Data String on Video Overlay

    edit: I came to exactly the same conclusion as .Paul, who was way ahead of me, so I might as well delete my post! BB
  25. VS 2008 Re: Out of memory exception is thrown at New Bitmap (X, Y, pixel format) argument

    Sorry Raynor, I was mistaken about the workaround. The format argument in Image.Save refers to the file format, not the pixel format (I should have checked: I guess it was a personal out-of-memory...
  26. VS 2008 Re: Out of memory exception is thrown at New Bitmap (X, Y, pixel format) argument

    Welcome to the forum, Raynor. The problem is with the next line


    G = Graphics.FromImage(bmp)

    The FromImage method doesn't work for several image formats, one of them being...
  27. Replies
    8
    Views
    576

    Re: 3D Phong Effect with GDI+

    GDI+ does not provide Phong or other 3D shading effects. As far as I know, you would need external APIs such as OpenGL or Direct3D for that purpose. WPF, which is at least integrated into Visual...
  28. Re: How can I compare 2 custom arrays of integers?

    Another approach worth considering is to use a HashSet for one of the arrays. The HashSet is rather like a generic List (with methods like Add, Remove, etc.) but is also optimized for set operations;...
  29. Replies
    19
    Views
    12,301

    Re: JPEG Auto Rotate Picture Box

    The function could certainly be better designed, but I don't think a missing exif tag is the problem: If pi IsNot Nothing deals with that. But if I were writing the Function now I would leave...
  30. VS 2019 Re: String compare. Can you just use "=" instead of String.compare() ?

    I was responding to Shaggy's "you can ... ignore case, which you can't do with the equals sign". If your preferred way of doing it is in some way superior, it would benefit the discussion to hear...
  31. VS 2019 Re: String compare. Can you just use "=" instead of String.compare() ?

    An alternative case-insensitive way to compare strings is:


    If str1.ToLower = str2.ToLower Then ...


    ToUpper works equally well. This assumes the default culture, US English). You can allow...
  32. Thread: 13 years

    by boops boops
    Replies
    59
    Views
    2,634

    Re: 13 years

    You're supposed to take them with a glass of water.

    Wait a minute, maybe I misunderstood. Try loosening your belt first.
  33. Replies
    9
    Views
    476

    VS 2019 Re: TextBox WordWrap but ignoring words

    Here's a super-simple way to get something looking like your example in post #1:


    TextBox2.Text = TextBox1.Text.Replace(ChrW(&H0020), ChrW(&H00A0))

    All it does is to replace the normal space...
  34. Replies
    9
    Views
    476

    VS 2019 Re: TextBox WordWrap but ignoring words

    It won't be problem with a monospaced font such as Courier New.

    BB
  35. Replies
    4
    Views
    403

    VS 2010 Re: overlay forms

    For a code example using multiple forms, you might want to glance at this entry in the CodeBank: http://www.vbforums.com/showthread.php?778673-How-to-draw-a-polygon-over-a-form-s-controls. It's...
  36. Re: ZoomPictureBox: picture control with mouse-centred zooming

    Hi Paul, welcome to VBForums.

    The ZoomPictureBox allows you to set the Image to Nothing and to call its Invalidate method in much the same way as a PictureBox. In both cases, the image source...
  37. Re: Picturebox with constant white space around image?

    I assume that "distortions" mean that the image is stretched disproportionately in the x or y direction. That can be overcome.

    In my view the best approach is to draw the image in the...
  38. Replies
    0
    Views
    721

    what's going wrong?

    bleh.... BB
  39. VS 2017 Re: Warping a Rectangular panel and its contents

    I haven't read the whole of this thread, but it reminds me of some code I posted a long time ago in this thread. The basic idea is that you draw whatever you want (except raster images) with a...
  40. Re: VS 2017 Picture On a panel disappearing after minimized

    Department of guesswork here. You say you want something that fits exactly on the MDI form and won't be affected by minimizing child forms.

    In that case, you need to put the image on the...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width