Skip to content

Triangle widget

The triangle widget is used to draw triangles on a slide.

Here's an example:

#config_version=5
slide_player:
  mc_ready:
    triangle_example:
      - type: triangle
        color: blue
        points: 0, 0, 100, 0, 100, 100
      - type: triangle
        points: 400, 400, 300, 200, 600, 500
        color: red
      - type: triangle
        points: 200, 500, 100, 400, 300, 400

The example above results in the following:

image

Settings

type: triangle
points:

Note

Triangle widgets also have "common" widget settings for position, opacity, animations, color, style, etc. Those are not listed here, but are instead covered in common widget settings page.

Also remember that all widget settings can be controlled via widget styles, rather than you having to set every setting on every widget.

The following triangle widget settings may be animated: color:, points:, opacity:, rotation:, and scale:.

type: triangle

Tells MPF that this is a triangle widget.

points:

A list of six numbers which are the the x,y coordinates for each of the three corners. For example, points: 400, 300, 200, 300, 400, 200 would be a triangle with one corner at (400, 300), another corner at (200, 300), and the final corner at (400, 200).


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results