当前位置: 首页>>代码示例>>PHP>>正文


PHP Shape::deletePointOnIndex方法代码示例

本文整理汇总了PHP中Shape::deletePointOnIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP Shape::deletePointOnIndex方法的具体用法?PHP Shape::deletePointOnIndex怎么用?PHP Shape::deletePointOnIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Shape的用法示例。


在下文中一共展示了Shape::deletePointOnIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Shape

<?php

require 'shape.php';
$myShape = new Shape();
echo "Shape methods: </br>";
$myShape->setPoints(5, 45);
$myShape->setPoints(55, 145);
$myShape->setPoints(45, 85);
$myShape->setPoints(56, 10);
$myShape->setPoints(45, 15);
$myShape->setPoints(56, 10);
$myShape->setPoints(39, 87);
$myShape->setPoints(17, 46);
echo "My points are:";
var_dump($myShape->getPoints());
echo "The perimeter of my shape is: " . $myShape->calcPerimeter() . "<br/>";
$myShape->modifyPointOnIndex(12, 13, 3);
echo "I just modified points of index 3! Now the point on index 3 has coordinates as follows: ";
var_dump($myShape->getPointOnIndex(3));
$myShape->deletePointOnIndex(2);
echo "I just delete a point of index 2!";
echo "Now my points are:";
var_dump($myShape->getPoints());
开发者ID:nadiaborisova,项目名称:php-mysql-course-softacad,代码行数:23,代码来源:shapeOtherMethods.php


注:本文中的Shape::deletePointOnIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。