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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:40:08+00:00 2026-06-02T23:40:08+00:00

According to the [Canvas.drawVertices Javadoc](http://developer.android.com/reference/android/graphics/Canvas.html#drawVertices(android.graphics.Canvas.VertexMode, int, float[], int, float[], int, int[], int, short[], int,

  • 0

According to the [Canvas.drawVertices Javadoc](http://developer.android.com/reference/android/graphics/Canvas.html#drawVertices(android.graphics.Canvas.VertexMode, int, float[], int, float[], int, int[], int, short[], int, int, android.graphics.Paint)) it is valid to pass null as Paint, if also the texs parameter is null.

paint Specifies the shader to use if the texs array is non-null

When calling the drawVertices method with a null for Paint, this will cause a Null Pointer Exception.

  • 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-02T23:40:10+00:00Added an answer on June 2, 2026 at 11:40 pm

    because internally it calls

    nativeDrawVertices(mNativeCanvas, mode.nativeInt, vertexCount, verts,
                       vertOffset, texs, texOffset, colors, colorOffset,
                      indices, indexOffset, indexCount, paint.mNativePaint);
    

    and paint.mNativePaint will cause a NullPointerException if paint is null. The doc forgot to tell you that paint can’t be null here 🙂

    Also painting vertices without paint does not seem to be logical since paint defines the line type etc. And the doc does not state paint is optional.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to http://www.html5samples.com/2010/03/html-5-canvas-the-2d-context-part-1/ This is the signature for the context.transform method context.transform(m11, m12, m21,
According to http://caniuse.com/script-defer , most browsers support the script tag's defer attribute. I would
ANY DOM element can be made resizable according to this page: http://jqueryui.com/demos/resizable/ However, it
I am trying to execute the QR Code tutorial according to this website http://www.onbarcode.com/products/android_barcode/barcodes/qrcode.html
According to the documentation: public static <T> int binarySearch(T[] a, T key, Comparator<? super
According to https://developers.google.com/fusiontables/docs/developers_reference OR operations are not allowed as part of filter conditions. So
Im working on an application for android that is using canvas operations to do
I've been following the lessons about transparency and gradients on the Mozilla site: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Applying_styles_and_colors
I need to implement a Canvas which scales its contents according to its size.
I want to dynamically resize the canvas size according to the content of a

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.