Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:38:44+00:00 2026-06-12T16:38:44+00:00

I’m trying to draw multiple shapes in the same Sprite.graphics scope, and can’t seem

  • 0

I’m trying to draw multiple shapes in the same Sprite.graphics scope, and can’t seem to find any reasonable solution to my problem.

Please keep in minde that I’ve been using the drawPath() method for a performance problem : I could use multiple shapes with blendmodes, but I’d like to avoid that and keep performances cost to the minimum.

I’ve been experimenting with the winding parameter of the drawPath() method, but one thing that I cannot understand, is how the winding direction is defined by Flash, so here is a first question before actually coming to the real problem :
Are points coordinates taken in account ? Or is it the angle between the produces lines that define the direction ?

That being said, here is my actual problem :
I want to draw a shape that is a projection from a rectangle on a line – think of a window and the light that passes through it that goes hit the floor.

enter image description here

To achieve that, I must take into account that the lightsource position can vary and have that kind of results :

enter image description here

Here on that second picture you can already see the problem I’m facing.
To draw my shape, I’ve been separately “drawing” (understand : placing the numbers in my coordinates vector) the different parts of my figure : the actual rectangle I want to project, the light projected from its left side, the light projected from its bottom side, and the light projected from its right side.

I’ve been trying to carefully keep the winding direction the same in every section, beginning from the top-left corner, but it seems something is wrong in my reasoning, since every time the center part overlaps with any side part, the shape is emptied there, and every time the two sides parts overlaps, the same happens.

As I’m writing that here, some revelation suddenly strike me, and now I guess that maybe ALL my points in my coordinates vector must be sorted in the same winding direction for my shape to work ?… (and not only the small parts I’m separately drawing in my mind ^^)

If I’m right (please correct me if I’m not, or if I’ve understood anything wrong ?…), that means I must either :

  • sort my points to be placed in the correct winding direction (thing that might be complicated and could result in some strange drawed shape once provided to the drawing API ?…)

  • only draw the shape from the most external points, depending on the shape’s actual shape (thing that might be more complicated that I currently expect).

Could anyone here confirm or infirm my last suppositions, and give me a clue on what could be going on here and how to solve it ?…

Thanks a lot 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:38:45+00:00Added an answer on June 12, 2026 at 4:38 pm

    You want to have one shape composed out of three projector lines? Okay, you have determined the positions of two lower points, and you have 4 points of your window. You then construct a list like so:

    • Two topmost points are always in the list, as you write that your light will always fall down out of the window. So, put 0 in command, window’s upper left point coordinates into path, 1 into command (lineTo), window’s upper right point into path.
    • Now, if both of your floor points have X less than lower right angle of the window, you add the window’s point into the path!
    • Then you add rightmost floor point, then leftmost.
    • Then, if both of your floor points have X greater than lower LEFT corner of the window, you add it to the list.

    You’re done. And you will no longer need 3 projections, you calculate only the bottommost one (it’ll give you both points on the floor), and make your list. Should do. Please comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.