Loading ...
Sorry, an error occurred while loading the content.

Lot of newbie questions

Expand Messages
  • firstbert
    Hello, I am new here and new to coding SVG (used inkscape for a longer time; not new to XML). My main ressources where SVG Essentials from 2002, the SVG
    Message 1 of 4 , Jul 29, 2013
    • 0 Attachment
      Hello,
      I am new here and new to coding SVG (used inkscape for a longer time; not new to XML).
      My main ressources where "SVG Essentials" from 2002, the "SVG primer" at w3.org and a bunch of links.

      And it's not clear if I should ask my newbie questions here - please shove me to a more appropriate forum then.

      Questions:
      1. processing.org vs. SVG
      I want to code my artwork (excessive patterns) with a few animations and some interactivity for changing color etc. with SVG and pure as possible SMIL, and only if really necessary a little bit JavaScript or XSLT.
      From a processing view - where are the greatest limits of SVG?

      2. BestPractice today from w3.org with attribute, style inTag inHead and extern?
      I stumbled upon a view recommendations in the innernets, to make ugly things with the presentation layer but would prefer the pure separation like in good XHTML-code. What is todays w3.org-BP for SVG styling?

      2.1 Did I get that wrong, that there are some SVG presentation attributes, that I could not address with CSS (If so, is there a comparing list somewhere?) Couldn't find this source again. Or otherway around: Could I style every attribute via CSS-Style (yes, I understand, that there are also SVG CSS-styles that are not available for XHTML)?

      3. relative line with angle:
      Could I draw a relative line +10px _with 60 degree angle_ and/or do this in a polygon for a triangle? I couldn't find anything - maybe wrong search-words?

      4. copycat prevent
      Is there any other way to hide the sourcecode of a big lossless scaleable (and therefore printable with high resolution) artwork instead of showing it only as a filmed video?

      ThanksInAdvance
      bert
    • Jason Barnabas
      Excellent questions firstbert. I m looking forward to reading some answers from the more knowledgeable on this list. Most of them I have no idea of an answer
      Message 2 of 4 , Jul 29, 2013
      • 0 Attachment
        Excellent questions firstbert. I'm looking forward to

        reading some answers from the more knowledgeable on this
        list. Most of them I have no idea of an answer to; however,
        I do have some thoughts on this one:

        > 4. copycat prevent

        > Is there any other way to hide the sourcecode of a big
        > lossless scaleable (and therefore printable with high
        > resolution) artwork instead of showing it only as a filmed
        > video?

        "Locks are designed to keep honest people honest."

        There are ways to make it more difficult for the unlearned
        to swipe your code. You can use javascript to disable their
        ability to click and view the source code, but those that
        know can figure out how to save it to their machine and just
        open it in a text editor. The more knowledgeable still will
        just go to where it is already saved on their machine to
        open the file and view the code.

        You can save your svg in one file and use another to display
        it. For example in HTML you can use something like
        <img src="filename.svg"/>

        If your presentation page was
        https://www.someisp.com/presentation.htm
        and I wanted to look at your code badly enough to go to the
        trouble I'd just delete the "presentation.htm" and replace
        it with "filename.svg"; however, many do not know they can
        do this and those would be thwarted.

        If it's the image you're trying to protect, you can't keep
        me from getting it. If I have to, I'll take a screenshot, or
        if necessary screenshots and sew them together.

        Even if you disable the print screen key using js or
        something elseĀ I still know how to get the screenshots.

        On the other hand, if it's the code you are trying to
        protect the only way I know to do that is to convert it to
        something else, say the video you mentioned or a raster file
        format, but what's the point of that?

        When I have code I don't want stolen I do the js lockouts
        and add some remarks in the code itself:

        <!--filename.svgcopyright 2013by Jason Barnabas

        Hi, I see you've decided to take a look at my code.
        I hope you can learn something useful here, but please do
        not copy this verbatim as it is copyrighted material.

        Have fun looking at my code and good luck in your projects.

        Sincerely,
        Jason
        -->

        There may be other things you can do to keep honest people
        honest and if you think your code is worth the effort then
        invest it and see where it takes you.

        Sincerely,
        Jason
      • Francis Hemsher
        Hi Bert, Yes, this is the best place for you to have your svg questions answered...welcome aboard! ... The casual copycat using showSource in the browser
        Message 3 of 4 , Jul 29, 2013
        • 0 Attachment
          Hi Bert, Yes, this is the best place for you to have your svg questions answered...welcome aboard!

          > 4. copycat prevent
          > Is there any other way to hide the sourcecode of a big lossless scaleable (and therefore printable with high resolution) artwork instead of showing it only as a filmed video?
          >
          The casual copycat using 'showSource' in the browser typically does not see the svg loaded thru an XML file. Therefore you can place an 'empty' svg element inline in your HTML document then populate it via an xml file that has the svg elements needed for your inline svg.

          Regards,
          Francis
        • Joe Doll
          Hi Firstbert, On the limits, the primary limit is the processor speed. When the animations are running, the larger more complicated ones will not be that
          Message 4 of 4 , Jul 30, 2013
          • 0 Attachment
            Hi Firstbert,

            On the limits, the primary limit is the processor speed. When the
            animations are running, the larger more complicated ones will not be
            that fluid. The SVG needs to be pretty complicated. For example, if your
            SVG file is around 850K, you will start getting non-fluid motion.

            You can usually use CSS, but I have found that SVG is easier for our
            work. CSS is good way to eliminate repeating attributes, but SVG has
            the defs tag. I usually use CSS for repeating attributes.

            SVG has relative and absolute modes. For example on paths 'm' is
            absolute and 'M' is relative.

            A good way to prevent copycats is to put the image in as raster. You
            convert the image to base 64 and stick that conversion on the backend of
            an image tag.

            SVG is the best format for complicated graphics. It has the structure
            you need to do whatever you want.
          Your message has been successfully submitted and would be delivered to recipients shortly.