Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:objects:shape_painter [2018/10/12 19:46]
valiant_curiosity [Examples]
gdevelop5:objects:shape_painter [2019/06/13 08:32] (current)
piyushpalawat99 [Draw a shape]
Line 14: Line 14:
 ==== Edit properties ==== ==== Edit properties ====
  
-Next we want to edit the object properties. Again, from the Properties list on the right, ​ click on the object. ​ Select "Edit object"​ from the popup list that is displayed. A new window opens. It displays the properties for the Painter Object.+Nextwe want to edit the object properties. Again, from the Properties list on the right, ​ click on the object. ​ Select "Edit object"​ from the popup list that is displayed. A new window opens. It displays the properties for the Painter Object.
 {{ :​gdevelop5:​objects:​shape-painter-properties.png?​nolink }} {{ :​gdevelop5:​objects:​shape-painter-properties.png?​nolink }}
 ==== Change the colour and opacity ==== ==== Change the colour and opacity ====
  
-The Shape painter properties window presents us with options that allow us to change the outline colour/​color of the objet, the fill colour/​color of the object, the opacity of each colour/​color,​ and the outline size of our object.+The Shape painter properties window presents us with options that allow us to change the outline colour/​color of the object, the fill colour/​color of the object, the opacity of each colour/​color,​ and the outline size of our object.
  
 {{ :​gdevelop5:​objects:​change-color-of-shape-painter.png?​nolink }} {{ :​gdevelop5:​objects:​change-color-of-shape-painter.png?​nolink }}
Line 32: Line 32:
 ==== Draw a shape ==== ==== Draw a shape ====
  
-To draw a shape, as usual, create a new object using the Objects Editor. ​ Add the "Shape painter"​ object to our scene. If we run  the preview now we won't see anything. The Shape painter object basically just adds the functionality for the object. For now it only holds the "Shape painter"​ properties/​parameters. To draw a shape, we need to use the Scene (Events) Editor. //If you are not familiar with events, I recommend to check out the events page on the wiki.//+To draw a shape, as usual, create a new object using the Objects Editor. ​ Add the "Shape painter"​ object to our scene. If we run the preview now we won't see anything. The Shape painter object basically just adds the functionality for the object. For nowit only holds the "Shape painter"​ properties/​parameters. To draw a shape, we need to use the Scene (Events) Editor. //If you are not familiar with events, I recommend to check out the events page on the wiki.//
  
 Let's go to the Scene Events Editor to add an event. Once you have added a new event, click the "add action"​ text. Let's go to the Scene Events Editor to add an event. Once you have added a new event, click the "add action"​ text.
 Find the events for Primitive drawing. ​ Find the events for Primitive drawing. ​
  
-{{ :​gdevelop5:​objects:​primitivedrawingeventchoices.png?​200 |}}+{{ :​gdevelop5:​objects:​primitivedrawingeventchoices.png?​nolink ​|}}
  
 We can choose from 3 different types of shapes to draw. Circle, Line, and Rectangle. We are going to draw a rectangle on the screen. Select the Rectangle under the drawing properties. We can choose from 3 different types of shapes to draw. Circle, Line, and Rectangle. We are going to draw a rectangle on the screen. Select the Rectangle under the drawing properties.
Line 48: Line 48:
 {{ :​gdevelop5:​objects:​rectanlge-shape-painter.png?​nolink }} {{ :​gdevelop5:​objects:​rectanlge-shape-painter.png?​nolink }}
  
-If we left the relative position enabled, you may notice our rectangle is in the the same position as the shape painter object even though ​it origin point is 0. Now if we disable that option and launch the preview again, you going to see our object is drawn in the top left corner of our scene.+If we left the relative position enabled, you may notice ​that our rectangle is in the same position as the shape painter object even though ​its origin point is 0. Now if we disable that option and launch the preview again, you going to see our object is drawn in the top left corner of our scene.
  
 Using events we can also change any properties of a shape on the fly. Using events we can also change any properties of a shape on the fly.
Line 60: Line 60:
 Open these examples online.</​note>​ Open these examples online.</​note>​
  
-[[https://​editor.gdevelop-app.com/?​project=example://​advanced-shape-based-painter|{{ :​gdevelop5:​objects:​shapepainterobject.png?​400 |}}]]+[[https://​editor.gdevelop-app.com/?​project=example://​advanced-shape-based-painter|{{ :​gdevelop5:​objects:​shapepainterobject.png?​nolink ​|}}]]
  
 * https://​editor.gdevelop-app.com/?​project=example://​advanced-shape-based-painter * https://​editor.gdevelop-app.com/?​project=example://​advanced-shape-based-painter