(float x, float y)
| 1396 | |
| 1397 | |
| 1398 | public void vertex(float x, float y) { |
| 1399 | vertexCheck(); |
| 1400 | float[] vertex = vertices[vertexCount]; |
| 1401 | |
| 1402 | curveVertexCount = 0; |
| 1403 | |
| 1404 | vertex[X] = x; |
| 1405 | vertex[Y] = y; |
| 1406 | vertex[Z] = 0; |
| 1407 | |
| 1408 | vertex[EDGE] = edge ? 1 : 0; |
| 1409 | |
| 1410 | // if (fill) { |
| 1411 | // vertex[R] = fillR; |
| 1412 | // vertex[G] = fillG; |
| 1413 | // vertex[B] = fillB; |
| 1414 | // vertex[A] = fillA; |
| 1415 | // } |
| 1416 | boolean textured = textureImage != null; |
| 1417 | if (fill || textured) { |
| 1418 | if (!textured) { |
| 1419 | vertex[R] = fillR; |
| 1420 | vertex[G] = fillG; |
| 1421 | vertex[B] = fillB; |
| 1422 | vertex[A] = fillA; |
| 1423 | } else { |
| 1424 | if (tint) { |
| 1425 | vertex[R] = tintR; |
| 1426 | vertex[G] = tintG; |
| 1427 | vertex[B] = tintB; |
| 1428 | vertex[A] = tintA; |
| 1429 | } else { |
| 1430 | vertex[R] = 1; |
| 1431 | vertex[G] = 1; |
| 1432 | vertex[B] = 1; |
| 1433 | vertex[A] = 1; |
| 1434 | } |
| 1435 | } |
| 1436 | } |
| 1437 | |
| 1438 | if (stroke) { |
| 1439 | vertex[SR] = strokeR; |
| 1440 | vertex[SG] = strokeG; |
| 1441 | vertex[SB] = strokeB; |
| 1442 | vertex[SA] = strokeA; |
| 1443 | vertex[SW] = strokeWeight; |
| 1444 | } |
| 1445 | |
| 1446 | if (textured) { |
| 1447 | vertex[U] = textureU; |
| 1448 | vertex[V] = textureV; |
| 1449 | } |
| 1450 | |
| 1451 | if (autoNormal) { |
| 1452 | float norm2 = normalX * normalX + normalY * normalY + normalZ * normalZ; |
| 1453 | if (norm2 < EPSILON) { |
| 1454 | vertex[HAS_NORMAL] = 0; |
| 1455 | } else { |
no test coverage detected