# Diagonal Badging

DevFeed: [Diagonal Badging](<https://devfeed.tech/articles/diagonal-badging-19287.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/diagonal-badging/>)

Author: Shai Almog

Published: 2020-07-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Website](<https://devfeed.tech/topics/website.md>), [Stack Overflow](<https://devfeed.tech/topics/stackoverflow.md>)

Tags: [arrow](<https://devfeed.tech/tags/arrow.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [code](<https://devfeed.tech/tags/code.md>), [component](<https://devfeed.tech/tags/component.md>), [edge](<https://devfeed.tech/tags/edge.md>), [effect](<https://devfeed.tech/tags/effect.md>)

## AI overview

A tutorial explains how to implement a diagonal badge in Codename One and corrects earlier drawing behavior that caused the banner to be cropped into an arrow shape.

## Source excerpt

Recently I got a question on stackoverflow about doing a diagonal badge that's actually quite similar to the one on our website. This isn't hard to do in Codename One but it requires a bit of tinkering so here's how you would implement that. As a matter of fact the original code I provided in the answer had a bit of a misbehavior which I'm fixing for this blog post so everything will look correct: