Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 8591 invoked from network); 25 Jun 2009 20:13:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jun 2009 20:13:36 -0000 Received: (qmail 98584 invoked by uid 500); 25 Jun 2009 20:00:32 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 98559 invoked by uid 500); 25 Jun 2009 20:00:32 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 98548 invoked by uid 99); 25 Jun 2009 20:00:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 20:00:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2009 20:00:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 68637234C1E6 for ; Thu, 25 Jun 2009 13:00:07 -0700 (PDT) Message-ID: <370815452.1245960007426.JavaMail.jira@brutus> Date: Thu, 25 Jun 2009 13:00:07 -0700 (PDT) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-1603) [classlib][awt] AffineTransform.transform(float[], int, float[], int, int) result deffers from RI if src and dst are the same array MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Hindess closed HARMONY-1603. --------------------------------- Closing as this works for me now. > [classlib][awt] AffineTransform.transform(float[], int, float[], int, int) result deffers from RI if src and dst are the same array > ----------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1603 > URL: https://issues.apache.org/jira/browse/HARMONY-1603 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Denis Kishenko > Assignee: Alexey Petrenko > Attachments: HARMONY-1603-AffineTransform.patch, HARMONY-1603-AffineTransformTest.patch > > > Harmony AffineTransform methods transform(float[], int, float[], int, int) and transform(double[], int, double[], int, int) results differ from RI if src and dst are the same array and coordinate sections are overlapping. > Harmony doesn't follow spec. > ============ Spec ================= > Transforms an array of floating point coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the specified offset in the order [x0, y0, x1, y1, ..., xn, yn]. > Transforms an array of double precision coordinates by this transform. The two coordinate array sections can be exactly the same or can be overlapping sections of the same array without affecting the validity of the results. This method ensures that no source coordinates are overwritten by a previous operation before they can be transformed. The coordinates are stored in the arrays starting at the indicated offset in the order [x0, y0, x1, y1, ..., xn, yn]. > =============== Test.java ================= > import java.awt.geom.AffineTransform; > import java.awt.geom.Point2D; > public class Test { > static public void main(String[] args) { > AffineTransform t = AffineTransform.getTranslateInstance(2, 3); > float[] points1 = new float[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}; > t.transform(points1, 0, points1, 4, 4); > for(int i = 0; i < points1.length; i++) { > System.out.print(points1[i] + ", "); > } > System.out.println(); > > double[] points2 = new double[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}; > t.transform(points2, 0, points2, 4, 4); > for(int i = 0; i < points2.length; i++) { > System.out.print(points2[i] + ", "); > } > } > } > ============= RI ================= > 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 5.0, 7.0, 7.0, 9.0, 9.0, 11.0, 13.0, 14.0, > 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 5.0, 7.0, 7.0, 9.0, 9.0, 11.0, 13.0, 14.0, > ======== Harmony ================ > 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 5.0, 7.0, 5.0, 8.0, 7.0, 10.0, 13.0, 14.0, > 1.0, 2.0, 3.0, 4.0, 3.0, 5.0, 5.0, 7.0, 5.0, 8.0, 7.0, 10.0, 13.0, 14.0, -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.