Home / Topic / Brush texture

Brush texture

Viewing 6 posts - 1 through 6 (of 6 total)
  • v1p_kokorin

    Hello Alex;Is there a remote chance to be able to create custom brush shapes? Like to be able to simulate a chalk or paint?


    There are two answers here. Yes, it would be possible to simulate a brush (using an image as reference), as we do currently with a vector circle. However, unfortunately not until Corona provides a way to play with bitmap manipulation this is not something I am planning to implement. This is because I would have to re-write lots of lines of code to handle the different options (use the current circle or use a “brush”) plus the fact (that's where the bitmap manipulation enters) that an image brush couldn't be colored (meaning if you image layer containing the shape of the brush is red, you would only use the brush in red).If you want to do it manually, create your canvas project "as is" then, replace the following line:

    local painter =  display.newCircle( event.x, event.y, brushSize, 100 ) painter:setFillColor(cR, cG, cB); painter.alpha = brushAlpha

    by (assuming your image layer name was exported as p1_butblack.png and its dimension is 122x123px):

    local painter =  display.newImageRect( imgDir.. "p1_butblack.png", 122, 123 );painter.x = event.x; painter.y = event.y--painter:setFillColor(cR, cG, cB); painter.alpha = brushAlpha 


    Hi Naoya

    I am having an issue with the canvas brush feature in Kwik, using version 3.2.4d. When setting the brush size I would like to set the alpha to semi-transparent as per Alex’s tutuorial http://kwiksher.com/tutorials_kwik/canvas/ However, when I do this, e.g. set the alpha to 50% it makes no difference in the simulator, ie. the alpha still shows as a 100% or in other words fully opaque. Any ideas as to what could be going wrong? Many thanks for your help, Fionnuala


    Please wait a while I check the behavior of brush with Alex’s tutorial this week


    I checked kwik’s internal behavior and seems it is a bug.
    You can see setStrokeColor, setFillColor in a generated lua file does not come with brushAlpha parameter.

    I will fix the problem and update kwik this week.


    Thank you Yamamoto for solving this problem. It works perfectly now.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd


WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-


google analytic