To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 7741
7740  |  7742
Subject: 
Re: LDGLite sketch feature (Was: Ldglite bug report)
Newsgroups: 
lugnet.cad.dev
Date: 
Sun, 25 Aug 2002 20:34:06 GMT
Viewed: 
2038 times
  
In lugnet.cad.dev, Jacob Sparre Andersen writes:
Can you dump the source somewhere, so I can rebuild LDGLite
with that feature? Which flags are needed to get that look?

I didn't add any flags, I still haven't taken the time to learn that part of
the code yet.  However, the only changes were to L3View.cpp, and are very
straightforward.  Note that this is just a proof-of-concept, and is far from
being ready for inclusion into ldglite!

Here's my copy (warning, DOS line endings and no new comments):

http://www.sproat.us/L3View.cpp

What I did:

- new global constant jitter_max -- this multiplied by the length of the
line segment determines the maximum jitter for a given line endpoint (still
need to implement scaling for line type 5, see below)

- new global constant jitter_num -- this is the number of jittered lines to
draw in addition to the unperterbed line; a value of 0 means no jittered lines

- new introduced function jitter() -- returns a random floating-point value
which lies between the low and high parameters

- new function render_line_jitter() -- draws one unperterbed line and
jitter_num perterbed lines

- new function render_five_jitter() -- draws one unperterbed type-5 line
and jitter_num perterbed type-5 lines (no scaling, but I think I should
scale by the distance between first two points; I don't know if I should
jitter the last two points or not...!)

- modified function DrawPart() -- color 24 is replaced with CurColor
instead of edge_color(); switch(LinePtr->LineType) cases 3 and 4 now call
render_line_jitter() and render_line_jitter() and render_five_jitter(),
respectively (previously called render_line(), render_line(), and
render_five() )

Hmm.  This is why I should write comments... :-,

Cheers,
- jsproat



Message has 2 Replies:
  Re: LDGLite sketch feature (Was: Ldglite bug report)
 
(...) Let's re-write that, and break it up a bit: - modified function DrawPart() - color 24 is replaced with CurColor instead of edge_color(CurColor), just like color 16 - switch(LinePtr->LineType) cases 3 and 4 use a constant color 15 - (...) (22 years ago, 25-Aug-02, to lugnet.cad.dev)
  Re: LDGLite sketch feature (Was: Ldglite bug report)
 
(...) substituted "L3View.cpp" with (URL), deactivated off-screen rendering in the make file, and compiled. But when I try to use it: jsproat.ldglite -mc fly.mpd I just get the usual image. Is your function hidden in some Win32 specific code? Should (...) (22 years ago, 25-Aug-02, to lugnet.cad.dev)

Message is in Reply To:
  LDGLite sketch feature (Was: Ldglite bug report)
 
(...) > > (URL) wants that! Can you dump the source somewhere, so I can rebuild LDGLite with that feature? Which flags are needed to get that look? (...) :-) (...) Certainly. Play well, Jacob (22 years ago, 25-Aug-02, to lugnet.cad.dev)

63 Messages in This Thread:
















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR