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

  • Home
  • SEARCH
  • 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 7943673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:20:20+00:00 2026-06-04T00:20:20+00:00

This functionality exists in desktop programs such as Adobe Illustrator or Painter. You can

  • 0

This functionality exists in desktop programs such as Adobe Illustrator or Painter.

You can select a brush that is a pattern of images. Starting to paint on canvas displays a line (or any pattern) created from a set of images of different sizes and rotations. Approximately how I portrayed in the picture (the red line is a path of the brush motion).

enter image description here

Is there already a library for this effect, or how it can best be implemented?

  • 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-04T00:20:22+00:00Added an answer on June 4, 2026 at 12:20 am

    Listen for MouseEvent.MOUSE_DOWN on your drawing canvas and once it fires, add a Event.ENTER_FRAME to begin drawing. The drawing itself is pretty straightforward – on every frame you take the mouseX and mouseY values and add the PNG image on the canvas in the exact place with any transformations (scaling, rotation, alpha) for that particular image. Here’s a simple example:

    private var PatternPNG:Class;
    private var canvas:Sprite;
    
    private function init() {
      canvas = new Sprite();
      addChild(canvas);
      canvas.graphics.beginFill(0xFFFFFF);
      canvas.graphics.drawRect(0,0,CANVAS_WIDTH,CANVAS_HEIGHT);
      canvas.graphics.endFill();
      canvas.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
    }
    private function onMouseDown(e:Event):void
    {
      canvas.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
      canvas.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
      canvas.addEventListener(Event.ENTER_FRAME, onEnterFrame);
    }
    private function onMouseUp(e:Event):void
    {
      canvas.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
      canvas.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
      canvas.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    }
    private function onEnterFrame(e:Event):void
    {
      var patternPiece:DisplayObject = new PatternPNG();
      patternPiece.rotation = Math.random() * 360;
      patternPiece.alpha = Math.random();
      patternPiece.scaleX = patternPiece.scaleY = 0.2 + Math.random() * 0.8;
      patternPiece.x = mouseX;
      patternPiece.y = mouseY;
      canvas.addChild(patternPiece);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I 've researched and noticed that ActiveResource lack this functionality. So, what is the
I cannot locate within the FAQ whether this functionality exists in the API although
Not sure if such functionality exists but I'm curious if I have the following
I'm trying to make work a functionality that exists on my website but works
Do any libraries exist with this functionality? Any recommendations would be useful. Thanks.
How to use this functionality in ninject 2.0? MyType obj = kernel.Get<MyType>(With.Parameters.ConstructorArgument(foo,bar)); The With
It looks like HandlerExceptionResolver provides this functionality: resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception
I would like to achieve this functionality. <p:column> <p:commandLink value=prihlasit oncomplete=dlg.show(); action=#{signForProjectBean.setProjectForDetail(item)} /> </p:column>
I would like to ask is there any way to achieve this functionality: I
Which method is very effective and simple to code to attain this functionality ?

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.